Technological Arts always used to pre-program their Motorola boards with simple little test programs. That way, when you unpacked it and hooked it up it would be able to do something right away.
So I started writing one for the Junebug 18F1320. It's simple polled RS232 at present and doesn't test absolutely everything on the board yet, as I don't have some components installed yet. I expect to have my trimpots this week, and I think I have one of those IR sensors somewhere in a junkbox. When those parts are installed I'll finish the program, as well as make it more interrupt-driven (not that it really matters in this program, but it's a nicer way to do it).
The display to the right on the breadboard and all the parts to the left are not connected at present. They're just leftovers from a previous project.
Here it is with code slightly modified for display on a **broken link removed**
Oh ya! It runs at 9600 baud, 8N1 for now, so set up your terminal accordingly.
;* main - poll rs232 for menu commands and branch accordingly
loop call rs_recv ;wait for a char
andlw b'00111111' ; convert to upper case
movwf char ;save the char for later
;* main - poll rs232 for menu commands and branch accordingly
loop call rs_recv ;wait for a char
andlw b'00111111' ; convert to upper case
movwf char ;save the char for later
Well duh! I should have thought of that. Just do it once. Most of that menu code is from a few years back when I did this on a 16f628. Time to clean it up.
;* main - poll rs232 for menu commands and branch accordingly
loop call rs_recv ; wait for a char
UpCase addlw 255 - "z" ; Get the High limit
addlw "z" - "a" + 1 ; Add Lower Limit to Set Carry
btfss STATUS, C ; If Carry Set, then Lower Case
addlw h'20' ; Carry NOT Set, Restore Character
addlw "A" ; add 'A' to restore the Character
movwf char ; save the char for later
;* main - poll rs232 for menu commands and branch accordingly
loop call rs_recv ;wait for a char
andlw b'00111111' ; convert to upper case
movwf char ;save the char for later
Interrupt receive version posted to same rar. This version runs at 57600 - 8/N/1. Just download from the same link as before. Both versions are in the rar. The file for this version is 'int_diag'.