Permalink
Browse files

Initial Commit.

Old project (1997ish) to create a PIC16-powered platform for a
micromouse contest.
  • Loading branch information...
Mark Dennehy
Mark Dennehy committed Jul 9, 2017
1 parent 6e2f636 commit b001c1ef2e5e4d01e06402aea759e6a3e3a3db6f
Showing with 4,826 additions and 0 deletions.
  1. +20 −0 header
  2. +14 −0 library header
  3. +49 −0 makefile
  4. +49 −0 makefile.bak
  5. +20 −0 module header
  6. +20 −0 routine specification
  7. +205 −0 src/ctree_a.asm
  8. +443 −0 src/ctree_c.asm
  9. +1,589 −0 src/ctree_d.asm
  10. +144 −0 src/ctree_mc.asm
  11. +120 −0 src/ctree_p.asm
  12. +120 −0 src/ctree_t.asm
  13. +372 −0 src/lcd.asm
  14. +361 −0 src/main.asm
  15. +81 −0 src/messages.asm
  16. +221 −0 src/selftest.asm
  17. +839 −0 src/usart.asm
  18. +101 −0 src/util.asm
  19. +58 −0 src/vt100.inc
View
20 header
@@ -0,0 +1,20 @@
;--------------------ROUTINE SPECIFICATION-------------------
;
; NAME :
;
; FUNCTION :
;
; INPUTS :
;
; OUTPUTS :
;
; CALLS :
;
; CALLED BY :
;
; NOTES :
;
;------------------------------------------------------------
; REVISION HISTORY :
;
;------------------------------------------------------------
View
@@ -0,0 +1,14 @@
;--------------------LIBRARY SPECIFICATION-------------------
;
; NAME :
;
; FUNCTIONS :
;
; REQUIRES :
;
; NOTES :
;
;------------------------------------------------------------
; REVISION HISTORY :
;
;------------------------------------------------------------
View
@@ -0,0 +1,49 @@
#######################################################################
# PICRat Makefile
# Mark Dennehy, BA, BAI
# 12/97
#
#######################################################################
PICRAT = ..
VPATH = src;lib
AS = /Progra~1/MPLAB/mpasm
LINK = /Progra~1/MPLAB/mplink
LIB = /Progra~1/MPLAB/mplib
FILES = USART \
Messages \
SelfTest \
CTree_A \
CTree_D \
CTree_C \
CTree_P \
CTree_MC \
CTree_T \
Main \
.SUFFIXES :
.SUFFIXES : .O
#######################################################################
%.O : %.asm
$(AS) /olib\\$(@F) /q $(addprefix src\\,$(<F))
all: clean hex
hex: library
cd bin;$(LINK) /m picrat.map /o picrat.hex /n 0 picrat.lkr ..\\lib\\picrat.lib ..\\lib\\main.o
library: objects
cd lib ; $(LIB) /c picrat.lib $(addsuffix .O,$(FILES))
objects: $(addsuffix .O,$(FILES))
clean :
rm -f lib/*.O lib/*.lib src/*.ERR src/*.LST bin/*.map bin/*.hex bin/*.COD bin/*.ERR bin/*.LST
View
@@ -0,0 +1,49 @@
#######################################################################
# PICRat Makefile
# Mark Dennehy, BA, BAI
# 12/97
#
#######################################################################
PICRAT = ..
VPATH = src;lib
AS = /Progra~1/MPLAB/mpasm
LINK = /Progra~1/MPLAB/mplink
LIB = /Progra~1/MPLAB/mplib
FILES = USART \
Messages \
SelfTest \
AnalogTree \
DigitalTree \
CounterTree \
PWMTree \
MotorControlTree \
TimerTree \
Main \
.SUFFIXES :
.SUFFIXES : .O
#######################################################################
%.O : %.asm
$(AS) /olib\\$(@F) /q $(addprefix src\\,$(<F))
all: clean hex
hex: library
cd bin;$(LINK) /m picrat.map /o picrat.hex /n 0 picrat.lkr ..\\lib\\picrat.lib ..\\lib\\main.o
library: objects
cd lib ; $(LIB) /c picrat.lib $(addsuffix .O,$(FILES))
objects: $(addsuffix .O,$(FILES))
clean :
rm -f lib/*.O lib/*.lib src/*.ERR src/*.LST bin/*.map bin/*.hex bin/*.COD bin/*.ERR bin/*.LST
View
@@ -0,0 +1,20 @@
;--------------------MODULE SPECIFICATION--------------------
;
; NAME :
;
; FUNCTION :
;
; INPUTS :
;
; OUTPUTS :
;
; CALLS :
;
; CALLED BY :
;
; NOTES :
;
;------------------------------------------------------------
; REVISION HISTORY :
;
;------------------------------------------------------------
View
@@ -0,0 +1,20 @@
;--------------------ROUTINE SPECIFICATION-------------------
;
; NAME :
;
; FUNCTION :
;
; INPUTS :
;
; OUTPUTS :
;
; CALLS :
;
; CALLED BY :
;
; NOTES :
;
;------------------------------------------------------------
; REVISION HISTORY :
;
;------------------------------------------------------------
View
@@ -0,0 +1,205 @@
;--------------------LIBRARY SPECIFICATION-------------------
;
; NAME : CTree_A.asm
;
; FUNCTIONS : Analog Command Tree
;
; NOTES :
;
;------------------------------------------------------------
; REVISION HISTORY :
; 9/1/98 First Draft
;
;------------------------------------------------------------
ERRORLEVEL 0
PROCESSOR PIC16C74A
LIST b=4
TITLE "Demonstration PICRAT program"
SUBTITLE "Version 1.00"
include <p16c74a.inc>
;--------------------ROUTINE SPECIFICATION-------------------
;
; NAME : AnalogRoot
;
; FUNCTION : Root of Analog Command Tree
;
; NOTES :
;
;------------------------------------------------------------
; REVISION HISTORY :
;
;------------------------------------------------------------
AnalogData UDATA
Analog_LineNo RES 1
Analog_DisplayFormat RES 1
GLOBAL Analog_LineNo
GLOBAL Analog_DisplayFormat
;------------------------------------------------------------
AnalogRoot CODE
AnalogRoot
GLOBAL AnalogRoot
EXTERN USART_getc
EXTERN USART_putc
EXTERN MainLoop
PAGESEL USART_getc
call USART_getc
xorlw A'r'
btfsc STATUS,Z
goto AnalogNode_A1
PAGESEL USART_putc
movlw '*'
call USART_putc
PAGESEL MainLoop
goto MainLoop
;------------------------------------------------------------
AnalogNode_A1
PAGESEL USART_putc
movlw 'A'
call USART_putc
movlw '1'
call USART_putc
movlw '\r'
call USART_putc
movlw '\n'
call USART_putc
PAGESEL USART_getc
call USART_getc
PAGESEL Analog_DisplayFormat
movwf Analog_DisplayFormat
xorlw A'%'
btfsc STATUS,Z
goto AnalogNode_A2
xorlw A'%'
xorlw A'd'
btfsc STATUS,Z
goto AnalogNode_A2
PAGESEL USART_putc
movlw '*'
call USART_putc
PAGESEL MainLoop
goto MainLoop
;------------------------------------------------------------
AnalogNode_A2
PAGESEL USART_putc
movlw 'A'
call USART_putc
movlw '2'
call USART_putc
movlw '\r'
call USART_putc
movlw '\n'
call USART_putc
PAGESEL USART_getc
call USART_getc
xorlw A'l'
btfsc STATUS,Z
goto AnalogNode_A3
xorlw A'l'
xorlw A'\r'
btfsc STATUS,Z
goto AnalogNode_A5
PAGESEL USART_putc
movlw '*'
call USART_putc
PAGESEL MainLoop
goto MainLoop
;------------------------------------------------------------
AnalogNode_A3
PAGESEL USART_putc
movlw 'A'
call USART_putc
movlw '3'
call USART_putc
movlw '\r'
call USART_putc
movlw '\n'
call USART_putc
PAGESEL USART_getc
call USART_getc
PAGESEL Analog_LineNo
movwf Analog_LineNo
addlw -30 ;If a number from 0..7
andlw H'F8'
btfsc STATUS,Z
goto AnalogNode_A4
PAGESEL USART_putc
movlw '*'
call USART_putc
PAGESEL MainLoop
goto MainLoop
;------------------------------------------------------------
AnalogNode_A4
PAGESEL USART_putc
movlw 'A'
call USART_putc
movlw '4'
call USART_putc
movlw '\r'
call USART_putc
movlw '\n'
call USART_putc
PAGESEL USART_getc
call USART_getc
xorlw A'\r'
btfsc STATUS,Z
goto AnalogNode_A5
PAGESEL USART_putc
movlw '*'
call USART_putc
PAGESEL MainLoop
goto MainLoop
;------------------------------------------------------------
AnalogNode_A5
PAGESEL USART_putc
movlw 'A'
call USART_putc
movlw '5'
call USART_putc
movlw '\r'
call USART_putc
movlw '\n'
call USART_putc
movlw '\r'
call USART_putc
movlw '\n'
call USART_putc
PAGESEL MainLoop
goto MainLoop
;------------------------------------------------------------
END
Oops, something went wrong.

0 comments on commit b001c1e

Please sign in to comment.