Looks very close.
If you are still using a rs232, then you want True, if you are not, then just as you did, with inverted.
Looks very close.
If you are still using a rs232, then you want True, if you are not, then just as you did, with inverted.
http://www.scalerobotics.com
Ah thanks for pointing that out. I was using a max232 with 'n' and not 't' :P
Working code:
Is a max232 needed? I haven't had much success without it in the past but I might consider trying to lose it since space is a bit tight in the dongle case.Code:Include "modedefs.bas" OSCCON = %01100000 'set for 4mhz internal CMCON0 = 7 'TURN COMPARITORS OFF ANSEL = %00000000 'Set A/D OFF ADCON0 = %00000000 'Analog converter OFF rcx var GPIO.4 'input pin tcx var GPIO.1 'output pin stat VAR byte Main: serin rcx,t2400,STAT pause 100 SEROUT tcx,t2400,[stat] GOTO Main END
When you use a hardware serial port on a pic16 device, you need an RS232. If you use hardware serial on a PIC18, then you can invert the bits to get away without one.
For degug or serin/out you don't need one. You can follow the directions in the manual for the resistor size to protect your pic.
http://www.scalerobotics.com
Awesome thanks so much for your help. Just got to search through the manual now. 10k sticks in my head for some reason but I will check.
Thanks again.
Last edited by ross246; - 17th November 2010 at 16:53.
Bookmarks