Ritchie Thai's Blog – February 2011 Archive (2)

ADC Sample Code has a bug (it seems)

There seems to be a mistake, because the code did not work, and after my change, it did work.

 

MainLoop

    bsf        ADCON0,2        ;start conversion and wait for it to complete

    btfsc    ADCON0,2

    goto    $-2

 

goto $-2 is wrong, because it goes back 2 lines and starts the conversion all over again. You'll want to goto $-1 instead, to just test until the conversion is done.

 

However, I would reccommend this…

Continue

Added by Ritchie Thai on February 19, 2011 at 7:21pm — No Comments

Tool: MPASM LCD String Writing Code Generator

http://dozydagger.com/misc/mpasm-lcd-writer.html

 

You know what I say to tables? Well, I don't say it, because I am not the type to publicly use such language, but once you get past the character limit it causes problems that can be tricky even if the solution is known.

 

Here's a work around that I'm using. "can" wasn't worth making a table for. A table would take 4 lines. If you include the code to…

Continue

Added by Ritchie Thai on February 1, 2011 at 1:30am — No Comments

© 2024   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service