7-segment display module

Working Display

Arduino library available on Github

This was one of my first doublesided and surfacemount boards. I made this board using Eagle for layout and then I used 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.

SAA1064 Datasheet

7-segment Datasheet

Schematic

C1, 2.7nf (2700pf)

R1,R2 = 220 Ohms

Constants

saa1065const.asm
; SAA1064 Constants
SAA1064ADDRESS	EQU	B'01110000'	; I2C Address
SAA1064CONTROL	EQU	B'00000111'	; Control, bits 6:4 are for brightness
SAA1064SEGDASH	EQU	B'01000000'	; -
SAA1064SEGDP	EQU	B'10000000'	; .
SAA1064SEGJ	EQU	B'00011110'	; J

PIC18 assembly code lookup table

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,A
	MOVLW	0x10
	SUBWF	Temp,A
	BTFSC	STATUS,C
	RETLW	B'11000000'	; Return 0xC0 if over 0x0F - Light up DP and G segments
	BCF	STATUS,C
	RLCF	Temp,w
	ADDWF	PCL,F
	RETLW	B'00111111'	; 0
	RETLW	B'00000110'	; 1
	RETLW	B'01011011'	; 2
	RETLW	B'01001111'	; 3
	RETLW	B'01100110'	; 4
	RETLW	B'01101101'	; 5
	RETLW	B'01111101'	; 6
	RETLW	B'00000111'	; 7
	RETLW	B'01111111'	; 8
	RETLW	B'01100111'	; 9
	RETLW	B'01110111'	; A
	RETLW	B'01111100'	; B
	RETLW	B'01011000'	; C
	RETLW	B'01011110'	; D
	RETLW	B'01111001'	; E
	RETLW	B'01110001'	; F
;End of Lookup
 
projects/electronics/7segdisplay.txt · Last modified: 2014/11/13 14:37 by photonicsguy
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki