-
Pin 13 I\o
Hello!
Can You help me?
i want to write 16byte in internel eeprom,
then read the 16 byte an send it on pin 13 out.
My programm:
SO CON 0
N2400 CON 4
B0 = VAR BYTE
B1 = VAR BYTE
B1 = "X"
A = VAR BYTE
OUTPUT 13
HIGH 4
FOR A=0 TO 15
WRITE A,B1
NEXT A
FOR A=0 TO 15
READ A,BO
SEROUT SO,N2400,[#B0," "]
NEXT A
I will programm it on a goldcard and put it in a chipdrive!
Why doesnt it works?
Thank's
RON
-
Hi Ron,
A few things going on here.
You've set SO as a constant of 0, then later used SO as the SEROUT pin. That will put the Serial Output on PORTB.0. I'm not sure which PIC you're using, but it's probably not pin 13.
Variable declarations...
B0 = VAR BYTE
B1 = VAR BYTE
should not have equal signs in them.
B0 VAR BYTE
B1 VAR BYTE
I'm not sure what these two lines are for...
OUTPUT 13
HIGH 4
but they have no bearing on your program.
Try it like this
Code:
SO VAR PORTB.0 ' Or whichever pin you like
N2400 CON 4
B0 VAR BYTE
B1 VAR BYTE
A VAR BYTE
B1 = "X"
FOR A=0 TO 15
WRITE A,B1
NEXT A
FOR A=0 TO 15
READ A,BO
SEROUT SO,N2400,[#B0," "]
NEXT A
HTH,
Darrel