Hi All,
I'm Very new here, Got my PBP 2.46 software with MCSP and Serial programmer by Melabs and have been writing some code in basic for the first time. Alot easier than Ansi C, thats for sure. Anyway, I'm really glad to be here.
Now on to my problem, I'm communicating to my 18f2620 with great success except for the fact that the speed at which I'm communicating is 2400 Baud. My intention is to be at 9600. The other unusal fact is that I have two blinking lights that Blink at a rate 4 times slower than the 500ms I have selected. So both Baud and Flashing lights are 1/4 what the should be. So i'm sure their must be an include file that i should be using but I didnt find exactly what I was looking for In the Forum. I was hoping for some guidence.
I should mention that each time i use the serial programmer it selects XT for my OSC at the top of "Configuration Screen"- (sorry dont really know the name of that screen.) If I select INTRC or INTRC Clockout it will simply change my selection before i program it.
My thought is that I need to define it or add an include file. But How.
I'm not using an RS232 chip, I'm talking Directly as it has an internal USART. so I think I should be using INV output, and I wanted to eliminate all possibilities for human error until I get some stick time with my new toys...
Any Ideas?
Ash Man
'Code:
loop:
SEROUT2 portc.6, 16468, ["Hello World!", 13,10] ' 9600, I think
High PORTB.0 ' Turn on LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Low PORTB.0 ' Turn off LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
High PORTB.3 ' Turn on LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Low PORTB.3 ' Turn off LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Goto loop ' Go back to loop and blink LED forever
Bookmarks