Oh man, you can cross me off the list sorry Scampy, I have long moved away! 
PBP can’t support newer devices simply because PBP compiles to 8 bit RISC assembler, and would have to be entirely rewritten to support dsPic or Pic32.
I still visit in some effort to stay fresh because I maintain PBP is still my choice if a task does call for an 8 bit controller, but I don’t find that exciting at all.
PBP has (had) far more going for it in terms of transparency, and it’s use as a stepping stone than the Arduino environment will ever have.
It’s never been the job of a language or compiler to support any particular hardware unless that language or compiler came part and parcel with a particular computer.
Any serial display is far less complicated to interface with than an HD44780 character display. There are only libraries already existing for the Arduino ecosystem that
make things easier. PBP certainly does support any display that Arduino can though.
The best thing you could do for yourself is to move as far as possible away from the PBP manual, which is full of bad practice in it’s own examples,
and also as far away as possible from it’s canned library routines (commands).
Did you know that to write to a character LCD only requires the control of a port and two pins without any use of LCDOUT?
At least assuming it’s permanently wired to write as they typically are.
Code:
LCDSENDINSTRUCTIONBYTE:
enable = 1; // set enable pin
RS = 0; // set data or instruction (0 = instruction)
port = bytevalue
delay
enable = 0 //
RETURN
Code:
LCDSENDDATABYTE:
enable = 1; // set enable pin
RS = 1; // set data or instruction (1 = data)
port = bytevalue
delay
enable = 0 //
RETURN
That’s it! It only takes two more small routines to entirely abstract away the LCD hardware to the same extent that LCDOUT does.
There’s never a time in any real program that the string “Hello World” will be available at your fingertips.
Data always arrives byte by byte from somewhere, and that is how PBP canned commands and manual examples are a hinderance.
Code:
byte = $FE : GOSUB LCDSENDINSTRUCTIONBYTE // clear display
byte = $01 : GOSUB LCDSENDINSTRUCTIONBYTE
byte = $FE : GOSUB LCDSENDINSTRUCTIONBYTE // return home
byte = $02 : GOSUB LCDSENDINSTRUCTIONBYTE
Get some ASCII data from serial:
Code:
FOR i = 0 TO 20
SERIN byte : GOSUB LCDSENDDATABYTE
NEXT i
All untested and quite impractical pseudo code of course (though will mostly be right), and some delays are needed,
and in four bit mode, bytes are set nibbles a a time,
but enough to catch the drift, and closer to a normal cyclic program flow than manual examples.
The PBP manual doesn’t really give any good example of how a program would really work. only proper syntax.
Bookmarks