I do believe it’s 5 MHz with Fast PWM. I haven’t noticed any unusual things with PWM, but I also don’t have a ’scope to do a deep dive. Is there anything I can do with “normal” tools to check to see if the old Fast PWM problems are being exhibited?
With some back-of-the-napkin math / guesstimates based on LED vF and resistor values, I’d say the high channel is around 1.5 amps and the low channel is around 0.7 mA. So 1/255 of 1.5 amps is around 6 mA, much higher than the highest low channel value. The best option would probably be to replace that 4.7 kOhm resistor with a smaller value… oh well.
You’re right, I don’t think the t1616 resets eeprom when flashing. When needed (like when moving from Anduril1 to Anduril2), I’ve just done a factory reset. Speaking of that, one thing that LoneOceans did with the Lume series drivers was to prevent thermal calibration during a factory reset since he used a pre-calibrated temperature sensor. These 1-Series chips are also pre-calibrated, so there’s no need to auto-calibrate on reset. I didn’t check to see how to prevent this.
Fuses… thankfully I’ve seen absolutely no need to change fuse settings on the 1-Series. Most things we used to do in fuses can now be set at run-time (clock settings, brown-out settings, etc).
Sorry it’s me again, never mind my previous post, that was just a bad solder joint on my test board :FACEPALM: , compiling and flashing works fine. I did further testing on my driver and the problem comes from the boost enable pin, it’s floating at ~0.8V whether it’s off or on, I also assigned it to others pins (PB1, PB4, normally it’s PB3, for testing I enabled pull-up on PB3, which for some strange reason is at 2.2V instead of 2.8V) same result, then I assigned it to PA5 and it works : 0V when off, 2.8V when on. How does that make sense ?
Hmm, I wish I had a good answer for that. Is it possible that it has something to do with the driver design? Not saying it’s wrong or bad, just something specific to hire it’s laid out?
I replaced the 416 with a 1616 on the xplained board, breadboarded the SP10S layout, with the LED enable assigned to PA1 (original) no problem, assigned to PB1 or PB2, doesn’t work, assigned to PC1, works.
That’s really weird. You might have to check in over at avrfreaks to see if they have any ideas about the PortC behavior. You’re just using it as a basic IO pin and setting it high and low, right? Do you have a pull-down resistor on your LED enable channel? If so, what value? Maybe PortC output is very weak or something?
You’ll need to enable Split mode. I haven’t tried that yet myself, but I see the very knowledgable El Tangas has examples here
Ohhh, I think you’re onto something! Worth noting, each “pin group” has a maximum combined source/sink current. According to Table 36-10, that appears to be 100 mA. That sounds like plenty, but very well could be what you’re running into. I’m pretty sure for these chips, “pin group” is synonymous with “port” (eg, Port A, Port B, and Port C).
Hmm, I put 100Ω on the RGB leds and PWM LED, 10K on the LED enable LED, I’ll try with more resistance on the two former, but it mirrors the issues on my driver, on which the load is on the uA order.
Testing with 10K resistors on the status leds, same result.
Moving led enable to PA5
PB0 PWM
PA5 led enable
PA1 R
PA2 G
PA3 B
No led enable.
Circuit on the breadboard :
I also checked with a voltmeter instead of status leds (i.e. the pins are only connected to the voltmeter), same result, I just used leds because it’s quicker for checking the pins status.
So at this point I’m eliminating any issues with the circuit, it must be in the code.
In the present state if I want to use the attiny1616 with my driver I must wire the PWM, led enable and RBG on different ports, which is possible of course, just not as convenient as using any pins. But if there is functionality added for the current sense resistor selection, then that’ll possibly means it’ll have to be on another (nonexistant) port. (Toykeeper said she has an unfinished branch that might have functionality for this).
Edit : for the 3rd question I’m guessing no, anduril apparently turns the flashligh off (led enable goes off) when putting 0 as the floor so it’s not obvious, but shortly before that the level just stops at 1/1023 for like half a second, instead of smoothly going to 0.
Looking with the scope, it seems that having the PWM pin (e.g. PB0) connected to a floating pin (e.g. PC0), doesn’t affect the waveform. The difference in current draw with the floating pin is about 50~100uA. I might do that, that way the hardware would be compatible with both TCA and TCD.