Hello fellow freaks
I'm trying to use an AS1116-BST 7 Segment Display driver with 0 percent luck so far.
I'm wondering if anyone else has used one before. I think I'm sending the correct initialisation characters. I've verified with a storage CRO that the SPI transfer is sending what I think I should be sending etc. I get nothing at all on my display. I've check the SPI speed is well above the minimum transfer times.
Here is my test code. Schematic attached too.
.equ DIGPOS_0 = $01 .equ DIGPOS_1 = $02 .equ DIGPOS_2 = $03 .equ DIGPOS_3 = $04 .equ DIGPOS_4 = $05 .equ DIGPOS_5 = $06 .equ DIGPOS_6 = $07 .equ DIGPOS_7 = $08 .equ DECODE_MODE = $09 .equ GLOBAL_INTENSITY = $0A .equ SCAN_LIMIT = $0B .equ SHUT_DOWN = $0C .equ FEATURE = $0E .equ DISPLAY_TEST_MODE = $0F ;************************************************ INIT_DISPLAY: ; initialise the display and turn on sbi PORTB, FSK_SS ; disable FSK cbi PORTB, DISP_SS ; enable display rcall WAIT ldi SPI_DATA, $01 ; load normal operation reset to default settings command rcall SPI_TRANSFER ; send command ldi SPI_DATA, SHUT_DOWN ; load shut down register rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $42 ; load enable command ( 0100 0010 ) rcall SPI_TRANSFER ; send command ldi SPI_DATA, FEATURE ; load feature register rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $FF ; load decode command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DECODE_MODE ; load decode register rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $07 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, GLOBAL_INTENSITY ; load global intensity register rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $07 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, SCAN_LIMIT ; load scan limit register rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $FF ; load full intensity command rcall SPI_TRANSFER ; send command ldi SPI_DATA, $10 ; load intensity register rcall SPI_TRANSFER ; send command rcall WAIT sbi PORTB, DISP_SS ; disable display ret ;**************************** TEST_DISPLAY: ; turn on all display segments sbi PORTB, FSK_SS ; disable FSK cbi PORTB, DISP_SS ; enable display rcall WAIT rcall WAIT ldi SPI_DATA, $00 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DIGPOS_0 ; load position rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $01 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DIGPOS_1 ; load position rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $02 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DIGPOS_2 ; load position rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $03 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DIGPOS_3 ; load position rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $04 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DIGPOS_4 ; load position rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $05 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DIGPOS_5 ; load position rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $06 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DIGPOS_6 ; load position rcall SPI_TRANSFER ; send command rcall WAIT ldi SPI_DATA, $07 ; load enable command rcall SPI_TRANSFER ; send command ldi SPI_DATA, DIGPOS_7 ; load position rcall SPI_TRANSFER ; send command rcall WAIT sbi PORTB, DISP_SS ; disable display ret ;************************************