PDA

View Full Version : serial problem



longsigh
- 8th November 2010, 18:39
pic18f2620.
uart connected to rfid reader
port a.3 and a.4 used for serial comms
port c.5 and c.6 used serial to communicate with serial to network adaptor.

all serial communication works fine.....except...... when i try to send data on c.5 no data is transmitted

However if i leave program Define's and delete program except:

SEROUT PORTC.5, [tagnum,pcount,tcount,stat]

it works...???...???

I Am fairly new to picbasic and now totally lost..........



HELPPPPPPP Please

mackrackit
- 8th November 2010, 19:50
Without seeing your code all we can do is guess. The configs will also help.

BrianT
- 9th November 2010, 09:18
The SEROUT command format is
SEROUT pin, mode, [var1, var2...]

You don't appear to have any MODE specified so no speed is specified.

HTH
BrianT

longsigh
- 9th November 2010, 13:01
THANK YOU!!!!!

i mis-typed copying from test program into main program and was having a moment of number blindness............lol

mackrackit
- 9th November 2010, 15:43
However if i leave program Define's and delete program except:

SEROUT PORTC.5, [tagnum,pcount,tcount,stat]

it works...???...???
That is the weird part.