Hello! I try this
serout portb.2, n2400, [$A0] but its bad .Pic nothing send. Help!!!
Hello! I try this
serout portb.2, n2400, [$A0] but its bad .Pic nothing send. Help!!!
hi irmus,
try this
serout PORTB.2,4,[$A0]
if this ones work, that mean you not declare :
INCLUDE "modedefs.bas" at the begining of your program
It appear that in some case that you must write PORTB.x in uppercase too.
Try also this :
DEFINE CHAR_PACING 1000
if this is not working tell me which PIC you use and how it is connected to RS-232 (with in serie resistor, thru an Max232...)
let us know !!!
regards
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I am using modedefs.bas . 4 - here it mode baudrate? I use max232 and pic16f84
Thanks
when you don't include modedefs.bas SEROUT serpin,4,... is the same as SEROUT serpin,N2400...
what is your taget device to receive $a0 ???
$a0= 160 (decimal) = BLANK character in ASCII table
maybe this is why.
try PORTB.2,n2400,["hello ",#10,10,13]
it suppose to display hello 10
let me know
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
One other thing,
it also seems that SEROUT don't understand $ before data. Only #.
in your case if you really want to send $a0 use a variable
ToSend var byte
ToSend=$a0
SEROUT PORTB.2,4,[ToSend]
or
SEROUT PORTB.2,4,[#ToSend] ; output will be 160
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I use comlite software and i can to see what i send to comport and what data receive from computer.
Thanks, i try this SEROUT PORTB.2,4,[#ToSend] ; output will be 160
you're welcome.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks