I know I'm on a bit of a fishing expedition here, but I'm really stuck - I've spent 20+ hours trying to figure it out so far. I've fried 2 displays so far (at $25+ a pop it's not a cheap way to figure it out!)
If anyone has used these with any success, then I'd be grateful for any assistance you can give me!
Thanks,
Grant
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Murphy's Law!!!!! Absolutely typical - I post the call for help and within 2 hours I've managed to find the answer!
Here's the code for anyone else who wants to use Sure Electronics diplays in a project. This code will display the digits 0 thru 9, then each segment of the display individually.
;Chip Settings
#chip 16F690,4
#config FCMEN=OFF, IESO=OFF, BOR=OFF, CPD=OFF, CP=OFF, MCLRE=OFF, PWRTE=OFF, WDT=OFF, OSC=INTRC_OSC_NOCLKOUT
;Defines (Constants)
#define CLK PortA.1
#define DATA PortA.0
;Variables
Dim DispVal As Byte
;Data tables
Table DisplayValue
0x3f
0x06
0x5b
0x4f
0x66
0x6d
0x7d
0x07
0x7f
0x6f
0x01
0x02
0x04
0x08
0x10
0x20
0x40
0x80
End Table
'Pin Direction
DIR PORTA.3 IN
GoSub ScreenRefresh
Main:
If PortA.3 = On Then
For i = 1 to 18
ReadTable DisplayValue, i, DispVal
for j = 1 To 8
Rotate DispVal Left Simple
CLK = 0
DATA = DispVal.0
CLK = 1
Next
Wait 1 s
Next
GoSub ScreenRefresh
End If
Goto Main
Cheers,
Grant
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
Anyone used one one of the Sure Electronics display boards with the 'SPI-like' interface before? http://www.sureelectronics.net/goods.php?id=721.
I know I'm on a bit of a fishing expedition here, but I'm really stuck - I've spent 20+ hours trying to figure it out so far. I've fried 2 displays so far (at $25+ a pop it's not a cheap way to figure it out!)
If anyone has used these with any success, then I'd be grateful for any assistance you can give me!
Thanks,
Grant
Murphy's Law!!!!! Absolutely typical - I post the call for help and within 2 hours I've managed to find the answer!
Here's the code for anyone else who wants to use Sure Electronics diplays in a project. This code will display the digits 0 thru 9, then each segment of the display individually.
Cheers,
Grant
Hmmm…. do the bbcodes for not allow formatting? Here it is again.
;Chip Settings
#chip 16F690,4
#config FCMEN=OFF, IESO=OFF, BOR=OFF, CPD=OFF, CP=OFF, MCLRE=OFF, PWRTE=OFF, WDT=OFF, OSC=INTRC_OSC_NOCLKOUT
;Defines (Constants)
#define CLK PortA.1
#define DATA PortA.0
;Variables
Dim DispVal As Byte
;Data tables
Table DisplayValue
0x3f
0x06
0x5b
0x4f
0x66
0x6d
0x7d
0x07
0x7f
0x6f
0x01
0x02
0x04
0x08
0x10
0x20
0x40
0x80
End Table
'Pin Direction
DIR PORTA.3 IN
GoSub ScreenRefresh
Main:
If PortA.3 = On Then
For i = 1 to 18
ReadTable DisplayValue, i, DispVal
for j = 1 To 8
Rotate DispVal Left Simple
CLK = 0
DATA = DispVal.0
CLK = 1
Next
Wait 1 s
Next
GoSub ScreenRefresh
End If
Goto Main
Grant