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 [2008/05/22 21:46] – 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 ==== | + | </ |
- | ;Lookup Table for 7-seg | + | |
- | ;TODO Add test to make sure number is 0x0F or below | + | |
- | ;DP is Bit 7 | + | |
- | SEG_LOOKUP | + | |
- | MOVWF Temp, | + | |
- | MOVLW 0x10 | + | |
- | SUBWF Temp, | + | |
- | BTFSC STATUS, | + | |
- | RETLW B' | + | |
- | BCF STATUS, | + | |
- | RLCF Temp, | + | |
- | 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 | + | |
+ | ====== PIC18 assembly code lookup table ====== | ||
+ | <file mpasm saa1065lookup.asm> | ||
+ | ;Lookup Table for 7-seg | ||
+ | ;TODO Add test to make sure number is 0x0F or below | ||
+ | ;DP is Bit 7 | ||
+ | SEG_LOOKUP | ||
+ | MOVWF Temp, | ||
+ | MOVLW 0x10 | ||
+ | SUBWF Temp, | ||
+ | BTFSC STATUS, | ||
+ | RETLW B' | ||
+ | BCF STATUS, | ||
+ | RLCF Temp, | ||
+ | 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 | ||
+ | </ |