projects:electronics:7segdisplay

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:electronics:7segdisplay [2009/01/07 17:07] photonicsguyprojects:electronics:7segdisplay [2014/11/13 14:37] (current) photonicsguy
Line 2: Line 2:
 {{:projects:electronics:7segdisplay:display_working.jpg?400 |Working Display}} {{:projects:electronics:7segdisplay:display_working.jpg?400 |Working Display}}
  
 +<note>**Arduino library available on [[https://github.com/Photonicsguy/SAA1064|Github]]**</note>
 This was one of my first doublesided and surfacemount boards. I made this board using Eagle for layout and then I used [[http://www.batchpcb.com|BatchPCB]] to manufacture the board. The board operates correctly, however, if I were to revise it, I would use a larger SMT resistor than the 0402 size. The board will be controlled via I2C from a PIC microcontroller, initially for the pressure sensor and later for other projects. This was one of my first doublesided and surfacemount boards. I made this board using Eagle for layout and then I used [[http://www.batchpcb.com|BatchPCB]] to manufacture the board. The board operates correctly, however, if I were to revise it, I would use a larger SMT resistor than the 0402 size. The board will be controlled via I2C from a PIC microcontroller, initially for the pressure sensor and later for other projects.
  
Line 10: Line 11:
 [[projects:electronics:7segdisplay:Schematic]] [[projects:electronics:7segdisplay:Schematic]]
  
-C1 is 2.7nf (2700pf)+C12.7nf (2700pf)
  
-R1=R2=220Ohms+R1,R2 = 220 Ohms
  
 {{:projects:electronics:7seg.jpg?200| }} {{:projects:electronics:7seg.jpg?200| }}
  
 ====== Constants ====== ====== Constants ======
- ; SAA1064 Constants +<file mpasm saa1065const.asm> 
- SAA1064ADDRESS EQU B'01110000' ; I2C Address +; SAA1064 Constants 
- SAA1064CONTROL EQU B'00000111' ; Control, bits 6:4 are for brightness +SAA1064ADDRESS EQU B'01110000' ; I2C Address 
- SAA1064SEGDASH EQU B'01000000' ;+SAA1064CONTROL EQU B'00000111' ; Control, bits 6:4 are for brightness 
- SAA1064SEGDP EQU B'10000000' ;+SAA1064SEGDASH EQU B'01000000' ;
- SAA1064SEGJ EQU B'00011110' ; J+SAA1064SEGDP EQU B'10000000' ;
 +SAA1064SEGJ EQU B'00011110' ; J 
 +</file>
  
 ====== 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,A  SUBWF Temp,A
- + BTFSC STATUS,
-</CODE> + RETLW B'11000000' ; Return 0xC0 if over 0x0F - Light up DP and G segments 
- ;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'00111111' ;
- MOVWF Temp,+ RETLW B'00000110' ;
- MOVLW 0x10 + RETLW B'01011011' ;
- SUBWF Temp,+ RETLW B'01001111' ;
- BTFSC STATUS,+ RETLW B'01100110' ;
- RETLW B'11000000' ; Return 0xC0 if over 0x0F - Light up DP and G segments + RETLW B'01101101' ;
- BCF STATUS,+ RETLW B'01111101' ;
- RLCF Temp,+ RETLW B'00000111' ;
- ADDWF PCL,+ RETLW B'01111111' ;
- RETLW B'00111111' ;+ RETLW B'01100111' ;
- RETLW B'00000110' ;+ RETLW B'01110111' ;
- RETLW B'01011011' ;+ RETLW B'01111100' ;
- RETLW B'01001111' ;+ RETLW B'01011000' ;
- RETLW B'01100110' ;+ RETLW B'01011110' ;
- RETLW B'01101101' ;+ RETLW B'01111001' ;
- RETLW B'01111101' ;+ RETLW B'01110001' ;
- RETLW B'00000111' ;+;End of Lookup 
- RETLW B'01111111' ;+</file>
- RETLW B'01100111' ;+
- RETLW B'01110111' ;+
- RETLW B'01111100' ;+
- RETLW B'01011000' ;+
- RETLW B'01011110' ;+
- RETLW B'01111001' ;+
- RETLW B'01110001' ;+
- ;End of Lookup +
  • projects/electronics/7segdisplay.1231376835.txt.gz
  • Last modified: 2014/11/13 10:50
  • (external edit)