
Originally Posted by
mister_e
Be careful with 18Fs.. when you write to a PORT you should use LATx instead of PORTx. If you write to adjacent bits, you should write to a shadow register first, then copy it to the whole port to avoid the Read-Modify-Write behaviour.
I would tend to change the LCDOUT statement... reading the Magn bit (from PORTD.7), save the result to a Temp variable then after show the result. When writing to Magn, you use LATD.7.
Bookmarks