Are you using the mecanique serialtool ? At least its a known quantity
try changing the pc end baudrate ie try 4800 and 19200
and the baudcon 4,5 bits as 0 and 1
maybe flash a led at 1 second intervals to check if osc is 20 mhz
Are you using the mecanique serialtool ? At least its a known quantity
try changing the pc end baudrate ie try 4800 and 19200
and the baudcon 4,5 bits as 0 and 1
maybe flash a led at 1 second intervals to check if osc is 20 mhz
yes im using MCS Serial tool,
4,5 = 0,1 and running @ 4800 results = ãã7üããã7üããã7üããã
same running at 19200 results = w~wüwüwüwüwüwüwüwüwüwüwü
not sure whats going on
Chris
Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."
ive been hooking it directly to PIC as I dont have a MAX232 chip or anything else available right now, I was told by the seller that I should be able to hook this cable directly to PIC but they had no help files, schematics, code etc.. available.
I have modified code for transmit to PC only, after I see something come in then I can work on the receive side. Here is my complete code right now, and I am using the microcode studio serial tool for connections.
Code:'* Notes : * '* : * '**************************************************************** Define OSC 20 define HSER_BAUD 9600 DEFINE HSER_BITS 8 DEFINE HSER_CLROERR 1 RCSTA = $90 TXSTA = $24 TRISC = %11000000 TRISD = 0 BAUDCON.4 = 0 BAUDCON.5 = 1 RCSTA.7 = 1 start: Hserout ["Hello World", 13, 10] ' Send text followed by carriage return and linefeed pause 1000 goto start End
Chris
Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."
Maybe sspcon1.5=0 just incase
I meant trying baudcon 4 and 5 =0 and then 4 and 5 as 1
I assume serial tool is set to 8 bits no parity and 1 stop bit
ive tried both as 0 and both as 1
Chris
Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."
What are your config settings i think the osc is not what yoyu think
you need a config fosc=hs in there
with the internal osc
for 4mhz you need a oscon=$60
or $70 for 8 mhz
Im useing a external OSC 20mhz using EC PIO mode so RA6 is IO, this is a TTL OSC
Chris
Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."
I think you have a few errors in your configuration too.
Try:
define HSER_RCSTA 90h
define HSER_TXSTA 20h
define HSER_BAUD 9600
define HSER_CLROERR 1
Do not put this after the defines:
RCSTA = $90
TXSTA = $24
By doing so, you are effectively messing up what the defines did, and in one case ($24) you are introducing an error (should be $20)
Ok well flash a led to prove osc is what you think
led is on 99% of the time, flashing ~2 times a sec, my baud rate is at 9600 right now
Chris
Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."
Are you using pbp3 ?
What about config cpudiv = osc1_pll2
Bookmarks