You do a total of 6 I2C_write()s in the ISR which equates to a whole lot of Wire.XX calls, conventional wisdom says that you should not do too much in an ISR and I'd say that's too much.
The ISR in the example is never called...and would not take that form if I ever get it working
I would do some clever bit manipulation and let the main() do the donkey work, especially as the AS1130 can run pretty much independently once it's got it's data.
The problem I am having is that the IRQ line on pin 11 should be pulled to VCC by a 4k7 resistor (datasheet fig 1) but is always around 0.05V whatever I do with the Interrupt bits.
I have 2 of these chips in working condition and both show the same characteristic - hence it must be me that's not doing something I should be (or doing something I shoudn't )
If you've got one of these working I would appreciate your measurements etc. or any other input you have of course...
Cool project, BTW. I did see the prices at Digi-Key I don't have any specific requirements, just thinking about experimenting a bit. Actually more interested in the AS1106/07 which are MAX7219/21 replacements but will operate down to 2.7V.
AS1130 6 132 LED driver with PWM 28 SSOP
AS5130 3 Magnetic Rotary Encoder with 8-bit Res 16 SSOP
AS1108 3 4-Digit LED Driver, Serially Interfaced 20 PDIP
AS1116 3 64 LED Driver with Detailed Error Detection 24 QSOP
The problem I am having is that the IRQ line on pin 11 should be pulled to VCC by a 4k7 resistor (datasheet fig 1) but is always around 0.05V whatever I do with the Interrupt bits.
Sounds like the interrupt is not being cleared despite your efforts.
If you've got one of these working I would appreciate your measurements etc.
I don't have one, but I think I'll get some samples, I was aware of them but never looked that close at their chips, they have some great offerings.
Sounds like the interrupt is not being cleared despite your efforts.
What I don't understand is...if I read out the registers in the AS1130 they all make sense and show the settings I have sent via I2C and everything works fine but the Interrupt status register shows all 0s which means that no interrupt has occured. The IRQ pin is still pulled low somehow though.
By the way...it's the AS1130 which generates the IRQ after certain conditions occur (like a movie ending).
I would expect the pin which is connected to VDD (5V on Arduino) via a 4k7 resistor to be at 5V or thereabouts at power up or POR and it isn't for some reason. All other pins with pull-ups are working as expected.
3x3 is the highest you can go with AMS. I have only placed one order for this particular chip because I just learned about it. I've actually done 3 3x3 samples with AMS so far. So, 27 devices so far, just three of these.
Trust me, I'm sufficiently cheeky. The last ADC that I asked AD for was a $30 part at Digikey (qty 1). I asked for two and got them.