Ok guys,
it definitively seems that there is something wrong in the PBP library somewhere.
The Serout (and Serout2), with PBP2.50A, and the program below, it JUST send 2 or 3 random character (yes, sometimes 2, some other times 3...)
I've putted a line in the code to flash a led to prove that the loop is going, but putting a scope on the output (on the pin PortD.7), I see only the transmission JUST after the reset and then NOTHING ELSE even if the loop is going and the led is flashing. So the instruction Serout2 bla bla bla, it is simply IGNORED! No transmissions at all, neighter the weird one. Just some character after the power-on.
The chip is again the PIC18F97J60 (100 pins version).
Any idea?
Code:
DEFINE OSC 25 'Set the Crystal Clock speed
INCLUDE "modedefs.bas" 'Inline compiler's pre-defined constants
ADCON0 = 0 'AD converter module 0 = disabled
ADCON1 = %00001111 'Set all analog pins to digital
ADCON2 = %00000000
CMCON = %00000111 'Comparator = disabled
INTCON = %00111000
INTCON2 = %10000000
INTCON3 = %00000000
RCON.7 = %00000000
EECON2.5 = 0 'Ethernet Module Disabled
SSP1CON1.5 = 0 'Disable SPI 1 and set pins as GPIO
SSP2CON1.5 = 0 'Disable SPI 2 and set pins as GPIO
TRISJ.7 = 0
TRISD.7 = 0 'PortD7 = RS-232 TX output for Display
LCD var PORTD.7
LED_what var PORTJ.7
Main:
SEROUT2 LCD, N9600, ["Hello World",13,10]
pause 1000
LED_what = ~ LED_what
GOTO Main
Thank you.
Bookmarks