How can I store a port number into the on chip EEPROM and then read it back and do something like this,
start:
High portnumber
pause 1000
Low portnumber
pause 1000
goto start
Printable View
How can I store a port number into the on chip EEPROM and then read it back and do something like this,
start:
High portnumber
pause 1000
Low portnumber
pause 1000
goto start
Not sure I understand what you want.
Are you wanting to make the whole port high or just have certain pins go high based on a number value?
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?
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
Yes.
That is after you change
PORTB to PORTC
:)
Yes of course, I missed that.
Thank you for your help. :)