I want to make a certain pin high based on a number that can be stored into a variable and the EEPROM.
I want to make a certain pin high based on a number that can be stored into a variable and the EEPROM.
Here is how to set the variables up. The read/write part is in the manual.
The above will make PORTB.2 high.Code:TRISB = %00000000 X VAR BYTE X = %00000100 PORTB = X
Change "X" and read/write to eeprom.
Is that what you are after?
Dave
Always wear safety glasses while programming.
Do I understand this right?
This will make PORTC.6 high?
And this will make PORTC.1 and PORTC.3 high?Code:TRISC = %00000000 X VAR BYTE X = %01000000 PORTB = X
Code:X = %00001010 PORTB = X
Last edited by Fredrick; - 20th August 2009 at 09:07.
Yes.
That is after you change
PORTB to PORTC
![]()
Dave
Always wear safety glasses while programming.
Bookmarks