PDA

View Full Version : HT16511+pic12f629



gr1ph0n
- 13th March 2011, 16:05
Hello!
I'm trying to make a VFD work with a pic12f629. VFD is taken from a car radio and it's driven by HT16511 from Holtek. I've made the program but before programming the pic, please can someone tell me if it's okay or not?


@ __config _XT_OSC & _WDT_OFF & _MCLRE_OFF & _CP_OFF & _PWRTE_OFF
DEFINE OSC 4
CMCON =7 ' Disable analog comparator
TRISIO =%00000000
GPIO=0
DEFINE SHIFT_PAUSEUS 100
DPIN VAR GPIO.0
CPIN var GPIO.1
STB VAR GPIO.2
command2 var byte : command2=%01000100
command3 var byte : command3 = %11000000
command1 var byte : command1 =%00001101
command4 var byte : command4 =%10001111 'display on, pulse width 14/16
segment var byte : segment=%11111111

main:
gosub led_display
goto main


Led_display:
low stb
shiftout dpin, cpin,4,[command1] ' set display mode
high stb
low stb
shiftout dpin, cpin,4,[command2] 'Data setting commands
high stb
low stb
shiftout dpin, cpin,4,[command3,segment] 'Address setting commands (segment should light up 8 segments)
high stb
low stb
shiftout dpin, cpin,4,[command4] 'Display control commands
high stb
pause 200
return

end

I have attached HT16511's datasheet. Thank you

pramodsinha
- 25th March 2011, 02:39
have u used ht 1621 to drive custom lcd ,pl. give some example if you have done.
i have little knowledge about these.
thanx

tercelugt
- 30th August 2012, 03:58
Interestingly, as I seek to work with the most PIC12F629 LM7001, 88-108 MHz :)