Hmmm - I was able to look at this for 30 minutes during lunch. Not enough time to get a handle on it. Don't see any output on my scope on GP2. GP2 is also the TOCKI input. Maybe this thing is defaulting to using TOCKI and overriding the TRIS comand. Looks like it defaults to a TOCKI input. Could the compiler possibly be this dense? Ans: YES. I'll put a scope back on it tonight....... -----Original Message----- From: Lawrence Lile To: PICLIST@MITVMA.MIT.EDU Date: Friday, June 25, 1999 9:19 AM Subject: CCS Compiler RS232 out causes global nuclear meltdown >(Ok, so I overstated the problem - no global nuclear meltdown, it just >causes me headaches ;-) Sorry about my warped sense of humor for subject >lines. ) > >I'm using the CCS compiler to send an RS232 signal out a pin to a PC. I >converted this code from a Microengineering Labs PICBASIC program, which >seems to operate OK in my test circuit (thus eliminatting the test circuit >from consideration - I hope!) BTW, I was impressed with the code compaction >of CCS C vs. ML Basic. CCS is not really so bad! > >The PIC (a 12C509) hooks up to a PC serial port through pin 2 and ground. >The BASIC routine has an option to invert the signal, so it works right with >the voltage levels in a PC serial port (or close enough). I'm using an >equivalernt in the CCS compiler I think. > >I clamp a 12C509 into the (previously working) zif socket, and get zippo for >output. > >Even a simple program: > > >#USE RS232(BAUD=2400, XMIT=PIN_B2, RCV=PIN_B3, INVERT, PARITY=N) > >#USE FAST_IO > >main: > > SET_TRIS_B(0B11111011); > > printf ("Hello cruel world"); > >goto main; > > >Doesn't show up on my PC. > >Can we all sing "Oh Where is my Breakout Box" with me? > >Later today I'll have a chance to put a scope on it and see if ANYTHING is >coming out. Anybody got any suggestions? What about the FAST_IO statement?