I have a basic A/D module written up. I left justified the input so ADRESH can be read directly as an 8-bit value. Outputs 0-7 on 3 LEDs (connected to C0-2) based on the input voltage to A0. It's saved in Code -> PIC Code -> Analog_to_Digital_Basic.asm, so feel free to use it as a reference/base if you're writing A/D stuff.
Here's the video:
And now there's also a version of the code which does the same thing but slicker - with tables: Code-> PIC Code-> Analog_to_Digital_Basic_Tables.asm. Also a good place to start for this stuff.
No comments:
Post a Comment