Can you post your entire code with the trisb and all ... plus whatever code you are using to determine it is not receiving.
Thanks,
Walter
Can you post your entire code with the trisb and all ... plus whatever code you are using to determine it is not receiving.
Thanks,
Walter
That's the code.Code:DEFINE OSC 4 ANSEL = %00000000 ' Pins to be Digital ANSELH = %00000000 ' Pins to be Digital TrisA = %00000000 PortA = 0 TrisB = %00100000 ' if the only input is pin 10 Rx PortB = 0 TrisC = %00000000 ' if none of the portC pins are used PortC = 1 CM1CON0 =0 CM2CON0 =0 CM2CON1 =0 adcon1=0 Include "modedefs.bas" DEFINE HSER_RCSTA 90h DEFINE HSER_TXSTA 24h 'sets bergh = 1 or 20h sets = 0 'define HSER_BAUDCON 1h ' 0h DEFINE HSER_BAUD 2400 '16468 DEFINE HSER_SPBRG 103 DEFINE HSER_CLROERR 1 rxVal Var word start: Hserout ["Hello World", 13, 10] ' Send text followed by carriage return and linef main: Hserin 10000,start,[rxVal] ' Get a char from serial port Hserout ["Got value:", rxVal] ' Send char out serial port pause 30 goto main
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_SPBRG 25 ' 2400 Baud @ 0.17%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
The above should be for 4MHz.
Can you also post your configs and what are you using for an OSC?
Dave
Always wear safety glasses while programming.
I have already tried that, so it's still a no go.
But no one has commented on the voltage levels of the max. it should say 10 but i dont get it higher than 7. when i rebuild the whole shematics on the breadboard the voltage got i little better but still no higher than 7
Check the capacitors used. See snap attached for value.But no one has commented on the voltage levels of the max. it should say 10 but i dont get it higher than 7. when i rebuild the whole shematics on the breadboard the voltage got i little better but still no higher than 7
Al.
All progress began with an idea
krise86, Depending on the capacitator values used with a MAX-232 the charge pump voltages should be around +-6 volts to +- 9 volts. The TRUE RS-232 spec calls out for mark,space voltages of +- 3 volts minimum... Some laptop computers now days do not meet the TRUE RS-232 spec limits as some only put 0 to +5 volts... That is why some laptop computers don't have a solid serial communications...
Dave Purola,
N8NTA
Yeah i am using 1uf caps, so it's not that. and i am reciving at this moment v- = -1.86 and v+ = 6.96.
I found out that i can use the pickit 2 as logic analyzer. and i see the bytes roll inn when the pic send out to pc but not ther other way around.
Im stumped... this sould work!
I have followd all the guidelines and shematics and caps. i have also oredered some new max and pic's. also alot of caps and resistors. I really want this to work.
Thx for all the help so far. i will get this to work! i hope
Bookmarks