1 Attachment(s)
Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
Hello.
I got some MBI5026, with LEDs connected to it's output. I want to turn them on via PBP.
According to datasheet, the following timing diagram should be used. I tried to use it with the code below,but it does not works. I have OE connected to GND, so this should not be an issue?
Code:
SDI VAR PORTC.4
CLK VAR PORTC.5
LE VAR PORTC.6
CONT VAR WORD
FOR CONT=0 TO 65535
LCDOUT $FE,$C0,"VAL=", DEC CONT
SHIFTOUT SDI,CLK, 0, [CONT]
HIGH LE
PAUSE 1
LOW LE
PAUSE 10
NEXT
Attachment 9351
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
From the SHIFTOUT section in the manual:
Quote:
SHIFTOUT DataPin, ClockPin, Mode, [Var{\Bits}...]
...
...
\Bits optionally specifies the number of bits to be shifted out. If it is not specified, 8
bits are shifted out, independent of the variable type.
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
I guess you have to make a word variable and send out the bits you need (if more than a byte).
Ioannis
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
variable is already WORD.
I tried to add \16 to shiftout, but still nothing...
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
What value of REXT do you have?
Just to be sure... it's a sink driver so you do have the LEDs connect the right way around - anode to +V, cathode to 5026 output pin), right?
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
Rext is 2.2K
LEDs are connected in a proper way - I tried to ground the LED pin going into the chip via 220 ohm resistor - it came on.
So I guess, maybe I need to change state of the OE pin too? Currently I have it grounded.
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
That all looks right according to the datasheet... OE is low-active so grounding it should be ok.
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
So, back to basics then.
Make sure you don't have anlog functions enabled on the pins you're trying to use. Verify that you can control the state of each indivivual pin that you're using.
After that (or before if you'd rather) it's time to hook up the scope or logic analyzer to verify that what you get is what you want.
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
yes, checked all that :)
tried to pull CLK, SDI, LE pins high/low - all work fine. Checked all wirings and contacts - everything is fine.
A little note - voltage on all output pins is about +3V regarding to GND, and does not change whatever command I send.
Re: Can such interface be handled with SHIFTOUT? (Macroblock MBI5026 LED driver)
Tried to play with OE pin - no change, it does not care whenever pull it high or low...