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
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?
Dave
Always wear safety glasses while programming.
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