Hi Everyone,
I have recently programmed a MSP430F2013 to give out a finite pulse train. I am using CCS v4 as my IDE. It has been only a month or so that I have been using it; hence I am stuck every now and then.
The next step of the program would be design a UI that will allow the user to
i) input the number of pulses desired (this is nothing but having the ability to change a volatile int)
ii) set the desired frequency (this is a value in TACCR0-- a register in timer A)
iii) set the desired duty cycle (this is a value in TACCR1--another register in timer A)
*** The user should not have a working knowledge of MCU or anything, but should be able to intuitively enter the values--the parameters for the pulses***
My problem seems to be:
a) I cannot figure out a way in which I can use scanf/cin command lines in my program that will prompt the user to enter a value--I tried a lot of different ways, but CCS never asks for it
b) Apart from allowing the user to enter the value, I would like the program to calculate the number of tick in TACCR0-1 w/o the user having to do the calculation--this part of the problem will be solved once I solve i)
Moreover, if anyone can point me to any literature/books that address these sorts of user i/o issues, I will be indebted. I have minimal working knowledge of C++, for I am learning it simultaneously while learning the MCU details.
If anyone has any idea of how to accomplish this, I will be really grateful.
Thanks,
UE