Hey Ben,
You were right, I had to switch the serial output of the PIC from the 2 pin on the DB9 cable to the 3 pin. But, that still didn't work so I then removed the 1k resistor that I had inline btwn the PIC and the DB9 and directly connected it to the 3 pin of the DB9 and it worked perfectly!
Now I have to learn SERIN,the code I posted actually came from a post from Mister_e because it seemed perfect for my project (thank you Mister_e) and then I just changed the output data. But, when I try to send anything from hyperterminal to the 12F675 nothing happens,nothing in the terminal window will show up regardless of any key I press???
Here is the actual code from Mister_e's post that I need help with getting the SERIN part working if anyone has some suggestions on why it's not working for me.
'12F675
@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON
DEFINE OSCCAL_1K 1
INCLUDE "modedefs.bas"
TX_Pin var GPIO.0 'To DB9 RX pin 2
RX_Pin var GPIO.1 'To DB9 TX pin 3
TRISIO.0 = 0 'Set GPIO.0 to output.
TRISIO.1 = 1 'Set GPIO.1 to input
ANSEL = 0 'disable ADCs
CMCON = 7 'disable comparator
AChar var byte
tx_pin = 0 'inverted mode idle state
achar="A"
Pause 100 'OSC settle time...
loop:
SerOut tx_pin,N2400,["Waiting for ",achar,13,10]
SERIN rx_pin,N2400,[achar]
serout tx_pin,N2400,["Got it...",13,10]
goto loop
Thanks again, this is great!
Bookmarks