Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:electronics:7segdisplay [2009/01/07 17:07] – photonicsguy | projects:electronics:7segdisplay [2014/11/13 14:37] (current) – photonicsguy | ||
---|---|---|---|
Line 2: | Line 2: | ||
{{: | {{: | ||
+ | < | ||
This was one of my first doublesided and surfacemount boards. I made this board using Eagle for layout and then I used [[http:// | This was one of my first doublesided and surfacemount boards. I made this board using Eagle for layout and then I used [[http:// | ||
Line 10: | Line 11: | ||
[[projects: | [[projects: | ||
- | C1 is 2.7nf (2700pf) | + | C1, 2.7nf (2700pf) |
- | R1=R2=220Ohms | + | R1,R2 = 220 Ohms |
{{: | {{: | ||
====== Constants ====== | ====== Constants ====== | ||
- | ; SAA1064 Constants | + | <file mpasm saa1065const.asm> |
- | SAA1064ADDRESS EQU B' | + | ; SAA1064 Constants |
- | SAA1064CONTROL EQU B' | + | SAA1064ADDRESS EQU B' |
- | SAA1064SEGDASH EQU B' | + | SAA1064CONTROL EQU B' |
- | SAA1064SEGDP EQU B' | + | SAA1064SEGDASH EQU B' |
- | SAA1064SEGJ EQU B' | + | SAA1064SEGDP EQU B' |
+ | SAA1064SEGJ EQU B' | ||
+ | </ | ||
====== PIC18 assembly code lookup table ====== | ====== PIC18 assembly code lookup table ====== | ||
- | <CODE> | + | <file mpasm saa1065lookup.asm> |
;Lookup Table for 7-seg | ;Lookup Table for 7-seg | ||
;TODO Add test to make sure number is 0x0F or below | ;TODO Add test to make sure number is 0x0F or below | ||
Line 33: | Line 36: | ||
MOVLW 0x10 | MOVLW 0x10 | ||
SUBWF Temp, | SUBWF Temp, | ||
- | + | BTFSC STATUS, | |
- | </ | + | RETLW B' |
- | ;Lookup Table for 7-seg | + | BCF STATUS, |
- | ;TODO Add test to make sure number is 0x0F or below | + | RLCF Temp, |
- | ;DP is Bit 7 | + | ADDWF PCL, |
- | SEG_LOOKUP | + | RETLW B' |
- | MOVWF Temp, | + | RETLW B' |
- | MOVLW 0x10 | + | RETLW B' |
- | SUBWF Temp, | + | RETLW B' |
- | BTFSC STATUS, | + | RETLW B' |
- | RETLW B' | + | RETLW B' |
- | BCF STATUS, | + | RETLW B' |
- | RLCF Temp, | + | RETLW B' |
- | ADDWF PCL, | + | RETLW B' |
- | RETLW B' | + | RETLW B' |
- | RETLW B' | + | RETLW B' |
- | RETLW B' | + | RETLW B' |
- | RETLW B' | + | RETLW B' |
- | RETLW B' | + | RETLW B' |
- | RETLW B' | + | RETLW B' |
- | RETLW B' | + | RETLW B' |
- | RETLW B' | + | ;End of Lookup |
- | RETLW B' | + | </ |
- | RETLW B' | + | |
- | RETLW B' | + | |
- | RETLW B' | + | |
- | RETLW B' | + | |
- | RETLW B' | + | |
- | RETLW B' | + | |
- | RETLW B' | + | |
- | ;End of Lookup | + |