Hi - Thanks for that - that was similar to what I thought might be needed. In fact, accurate frequencies are not that important, as long as the rates are consistent. However, since it shouldn't add much to the length of the code it is certainly worth including. As far as I can see the basic structure of the code is ok... The idea is I will combine this with serial driven interrupts so that a PC can control the output frequency etc. Servicing the interrupt routine in time may be tricky, but with 300 baud I hope to be ok!
I had a couple of questions about the ASM though - sorry If I've missed something obvious - I have used assembler before, but am a little rusty...:
RST?RP ; Set to BANK0
Firstly, what is the significance of the '?' - is it a standard ASM
MOVF _TMR1Reload ,W ; 1
Also, what is the significance of the _ prefix to the variable names as above in ASM...?
Finally, what is the significance of using Bank 0
I'll be back in the lab next week, so will let you know how it goes. Thanks for your help, and for the other people who have helped me out on the forum.
Cheers,
Ben
Bookmarks