PDA

View Full Version : interfacing HT1628 with pic ?



MR2010
- 24th May 2010, 09:40
im trying to send command and data to HT1628,anyone can help me i dont understand its datasheet and what i use shiftout or i2cwrite,please help about command and address,

http://www.chinaelite.com/pdf/HT1628.pdf

wolwil
- 24th May 2010, 18:53
what i use shiftout or i2cwrite


You would use SHIFTOUT because it is a serial interface not an I2C.

MR2010
- 24th May 2010, 23:52
thnks wolwil , ive tryed this code but nothings happening,any idea how to address this ic

DPIN VAR PortB.0
CPIN var PortB.1
STB VAR PORTB.2
B0 var byte
B1 var byte



main:
low STB
pauseus 1
b0 = $01


shiftout DPIN,CPIN,1,[$00,b0]
Pause 100
shiftout DPIN,CPIN,1,[$03,b0]
high STB


end

wolwil
- 25th May 2010, 04:17
shiftout DPIN,CPIN,1,[$00,b0]


At a quick glance I believe you have to send the LSB first according to the Datasheet and you are sending the MSB first. On the bottom of page 6 it shows the LSB being the first bit being clocked in.

Try changing the mode on your shiftout to a 0 like this:


shiftout DPIN,CPIN,0,[$00,b0]

MR2010
- 25th May 2010, 23:50
thank you wolwil for helping me , got it working now im trying to sort characters, have a great time wolwil ...