Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/14/12 21:31
Read: 556 times


 
#187144 - Using Timer Interrupts
Responding to: ???'s previous message
I found I can use the time interrupt that drives the UART to also drive the FSK generation call. Simply reading the value of the UART output allows me to select which frequency to generate.

That has led to an entirely new problem: I also need the ADC to read a voltage level and put it digitally into the code. Unfortunately, it seems that the ADC0 uses an EIEI external interrupt, which if I turn on, takes priority over the FSK generation and disables that. I would like to know if it is possible to run ADC conversion without an interrupt, and if so, what would be the IDE code for that, so I can put it in main() and also create a separate subroutine to get the ADC0 value so I can then print it to screen. All I have right now is a value that seems correct on the code's watch list, but when I print it to screen, it is not the same value that I am expecting. I should be getting close to zero but end up with a value closer to the previous value. It's like the ADC never gets reset during printing, but I even reset it manually after getting each value. Any tips?

List of 2 messages in thread
TopicAuthorDate
UART and FSK on C8051F996 Issue      Lucian Voicu      04/13/12 16:48      
   Using Timer Interrupts      Lucian Voicu      04/14/12 21:31      

Back to Subject List