
Originally Posted by
aratti
What kind of terminal are you using?
Can you post your wiring ?
Al.
Well it looks like i found the probleme, i looked over the max232 data sheet and i frogot to connect vcc and gnd
Now i recive the expected output but it wont read the input.
Code:
DEFINE OSC 4
'intcon=0 ' Interrupts disabled
cm1con0=0 ' Comparator 1 disabled
cm2con0=0 ' Comparator 2 disabled
'cm2con1=0 ' Comparator 2 disabled
ANSEL=0 ' Pins to be Digital
ANSELH=0 ' Pins to be Digital
Include "modedefs.bas"
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h 'sets bergh = 1 or 20h sets = 0
'define HSER_BAUDCON 0h ' 0h
'DEFINE HSER_BAUD 9600 '16468
DEFINE HSER_SPBRG 25
DEFINE HSER_CLROERR 1
rxVal Var Byte
HSEROUT ["Waitin signal"]
main:
hserin [rxVal]
hserout [rxVal]
'HSEROUT ["Test should work"]
pause 20
goto main
Any ideas?
And Thx for the help so far, sorry for not checking the schematics better
and im using 232analyzer terminal software
Bookmarks