SwingeyP
Member
Hello again. I now have a new project which will be a a Digital VFO using a 16f876a
I plan to use a rotary encoder to act as the 'user input' with an LCD showing the frequency and probably the AD9850 module.
As a newbie this is going to be a task and a half.
I have code for the LCD showing bar graphs and frequency readout etc.
I have just been playing with interupts to see how those works and with thanks to what Eric posted and some data sheet reading i'm fairly up on that. Well my code worked anyway
The next bit I have undertaken is the reading the rotary encoder. I have read the data sheet, understand what's going on to some extent but I need to know how to read just the two pins I have the encoder connected to.
The data sheet sets encoder = ra and then does a mov old, encoder. Which as I understand it loads what is currently on port A and places it in a variable called old.
How can I do this in OSHON but just addressing the two pins the encoder is connected to. I don't want to use a whole port just for two pins. I might use other pins of porta for something else .....
Also does anyone have a rotary encoder plugin for the OSHON simulator? - If not what clever ways can I simulate the encoder.
Thanks for any help.
Regards - Paul
I plan to use a rotary encoder to act as the 'user input' with an LCD showing the frequency and probably the AD9850 module.
As a newbie this is going to be a task and a half.
I have code for the LCD showing bar graphs and frequency readout etc.
I have just been playing with interupts to see how those works and with thanks to what Eric posted and some data sheet reading i'm fairly up on that. Well my code worked anyway
The next bit I have undertaken is the reading the rotary encoder. I have read the data sheet, understand what's going on to some extent but I need to know how to read just the two pins I have the encoder connected to.
The data sheet sets encoder = ra and then does a mov old, encoder. Which as I understand it loads what is currently on port A and places it in a variable called old.
How can I do this in OSHON but just addressing the two pins the encoder is connected to. I don't want to use a whole port just for two pins. I might use other pins of porta for something else .....
Also does anyone have a rotary encoder plugin for the OSHON simulator? - If not what clever ways can I simulate the encoder.
Thanks for any help.
Regards - Paul