I have an external 20mhz oscillator. Can you tell me what I need to do to use SEOUT2 and SERIN2 on pins PORTB.5 and PORTB.4?
I have an external 20mhz oscillator. Can you tell me what I need to do to use SEOUT2 and SERIN2 on pins PORTB.5 and PORTB.4?
Hi Bob,
Are you able to blink an led with the chip? It may sound stupid, but that eliminates a lot of other issues.
With the 20 mhz external OSC and the default configs, your chip will run at 48 mhz. So if you are using the default configs, you will have to define your OSC. You might also try Darrel's All Digital. It takes care of some of the analog settings that can throw us for a loop. It is located here: http://www.picbasic.co.uk/forum/cont...54-All-Digital
Im away from my PBP right now, but you should be able to use the PBP serout example from the manual.
Let us know if you get stuck.
You definitely do not want to enable the hardware USART if you want to use any bit-banged serial routines like SEROUT/SERIN or SEROUT2/SERIN2 on the hardware RX/TX pins.
Enabling the hardware USART prevents you from using the TX/RX pins as digital, so bit-banged serial commands can't control these pins.
And double-check your connections to the ST232. I suspect you have TX and RX backwards.
Last edited by Bruce; - 3rd February 2011 at 21:57. Reason: ST232 Connections
he is using this board http://www.olimex.com/dev/pic-p28.html so wiring should be correct. (for the hardware serial port that is)
Pin 17, TX on the PIC, should connect to pin 10 on the 232.
Pin 18, RX on the PIC, should connect to pin 12 on the 232.
Not the other way around like he states in his 1st post.
Last edited by Bruce; - 4th February 2011 at 01:24.
Bookmarks