Hi Joe,
Thanks for the reply, that does compile ok but it doesn't work,seems to keep sending data in a loop very fast by looking at the rx LED but nothing shows in hyperterminal.
Hi Joe,
Thanks for the reply, that does compile ok but it doesn't work,seems to keep sending data in a loop very fast by looking at the rx LED but nothing shows in hyperterminal.
Is there a level converter (MAX232 type) between the PIC and the PC?
If there is, change the N9600's to T9600. If not, your PC might have a problem receiving the 'weak' 5v RS232 coming from the PIC and you might have to use a MAX232 to get the PC to receive it. I know I almost have to use a MAX232 with my laptops and one of my newer desktops. But one of my 'old' desktops will take a 5v RS232 signal without a problem.
JDG
Bad config fuse setting, 9600 baud, using internal OSC AND with Serout combination??? no big chance that it's going to work.
At least fix your config fuse setting, try with a lower baudrate first and use DEBUG.
Sure it's compile OK probably you're using PM to compile AND those
are considered as Label... not much!Code:_CONFIG _INTRC _OSC _NOCLKOUT _WDT_ON _PWRTE_ON _MCLRE_OFF _BODEN_ON
Last edited by mister_e; - 30th November 2006 at 03:36.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hello mister_e,Originally Posted by mister_e
I compiled with MPASM, and didn't mess with his fuses except to add _ to config.
I tend to agree good luck getting any serout to work with internal osc, but as you see I missed that! Too busy fighting bad internet connectionalso not familiar with 12F series, look like PIA to me. Glad you are helping him. MY question is, did I do the changes in the serin2 correctly?
JS
Last edited by Archangel; - 30th November 2006 at 05:18.
Hi SamOriginally Posted by Sam
I can send data out from my keyboard using hyperterminal, but to save my butt I cannot receive any using it. Can you configure this with a resonator or a crystal instead of int osc, as mister_e pointed out?
JSOriginally Posted by mister_e
Thanks for the help so far,
I can send from pc to pic and rx from pic using the code below with the settings I first posted and the pic does reply "got it" when I enter an "f".
CODE:
loop:
SerOut tx_pin,N9600,["waiting for f ",10,13]
SerIn rx_pin,N9600,["f"]
SerOut tx_pin,N9600,["got it",13,10]
GoTo loop
This works most of the time. But yes, I will change to a external osc and I don't have to use a 12F675, I have some 16F628A's and some F84's.
I really need to have an example,any example of the correct syntax to recognize and reply to a defined string of char's.
Thanks again,I'm trying to get my brain around working with serial.
Sam
Hi Sam,
check out this link. JS
http://www.picbasic.co.uk/forum/show...t=PARSE+STRING
Originally Posted by Sam
If you're using the internal oscillator and it's messing up some of the time, switch to a lower baud rate. That might cure most of the problem. Also, try adjusting your OSC_CAL value. If you don't want to do that, use SEROUT2 instead of SEROUT. With that command, you can 'fine adjust' your baud to compensate for your oscillator being a bit out of whack.
I forget which-is-which, but I think if you get overrun errors, you're clock might be running fast, framing errors mean the clock is a bit slow (on the PIC that is).
JDG
Thank you all for the advice you've given me!
I did switch from intrc to XT ceramic 4mhz and that did it! I've been able to do allot of the things that just wasn't working before changing to XT. I also did start at lower baud rates as advised here and increased them as I made sure things were working correctly.
Thanks and best regards,
Sam
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks