#avr Logs

Nov 21 2018

#avr Calendar

01:22 AM The_CooIest is now known as The_Coolest
08:39 AM vmt: --
10:42 AM cehteh: LeoNerd: the boards arrived!!! .. well done thanks. and dont consider to change the leds (except to bigger diffuse)
11:18 AM LeoNerd: cehteh: Ooh.. So.. Funny story... I didn't properly realise until a few days after, but I managed to program those boards with my new fancy homemade AVR programmer.. This is odd because usually I can't.
11:18 AM LeoNerd: I'd never quite worked out why, but my fancy programmer can't talk to those boards usually, even though it works fine on most others
11:18 AM LeoNerd: After some experimentation it turns out that the reason is the DTR-RESET cap
11:22 AM cehteh: lol
11:22 AM LeoNerd: I'm not quite sure what makes my programmer different to e.g. the cheap usbasp which copes fine, nor what makes /this/ board different from others of that kind with the cap
11:22 AM LeoNerd: But I have something I can start from anyhow
11:23 AM cehteh: timing?
11:23 AM LeoNerd: Yeah most likely
11:23 AM LeoNerd: Looking on scope, the ATmega's reset pin doesn't stay low very long this way
11:23 AM LeoNerd: I wonder if the CH340T has some odd effect on it
11:23 AM cehteh: need longer time to pull down reset before starting programming to dischage the cap
11:24 AM cehteh: do you have some protection resistor on the reset line?
11:24 AM LeoNerd: 10k to VCC
11:24 AM cehteh: i mean on the programming line which pulls reset down
11:24 AM LeoNerd: Oh, no
11:25 AM cehteh: what size was that cap? 100n?
11:25 AM LeoNerd: 100n yes
11:25 AM cehteh: i mean thats a lot to drain
11:26 AM cehteh: actually hey when you pull that down, that might be some serious current already for a blink of time
11:26 AM LeoNerd: Yah
11:26 AM LeoNerd: But it's what all the Arduino boards seem to do
11:26 AM cehteh: yes
11:26 AM cehteh: i never liked it
11:26 AM cehteh: but its a cheap hack
11:27 AM LeoNerd: Oh, indeed. I'm just saying all the other boards do it, and those work fine
11:27 AM LeoNerd: So I don't know why mine is different
11:27 AM cehteh: you pull down reset and then start programming .. right?
11:27 AM LeoNerd: Yah
11:27 AM cehteh: you should pull down reset, wait a bit and then start programming
11:28 AM LeoNerd: That's what it does
11:28 AM cehteh: wait a bit longer
11:28 AM cehteh: wait 1 sec .. just for debugging
11:28 AM LeoNerd: I can't control that bit. That's just what the Pololu board does
11:28 AM cehteh: huh isnt that the firmware on your programmer?
11:29 AM LeoNerd: My programmer is a Pololu v1 in a box, with a bunch of surroundings
11:29 AM LeoNerd: level-shifter, output 74'125 buffer, Vtg supply/monitoring
11:29 AM cehteh: i also wonder if 10nF dtr cap would work better
11:30 AM cehteh: (or even less)
11:30 AM LeoNerd: But the core of generating the AVR ISP signals is just done by the pololu board - which has a PIC16 on it amusingly
11:30 AM cehteh: .. needs to be scoped
11:30 AM LeoNerd: Yeah, that's something I can easily test and show on scope actually
11:30 AM LeoNerd: Might do that tomorrow
11:31 AM cehteh: maybe cap and resistor, the cht pin needs to ram some current into it as well
11:31 AM cehteh: crappy design
11:32 AM LeoNerd: It might just be that I'm using the CH340T whereas others use CH340G or FTDI or others...
11:32 AM LeoNerd: maybe just odd internals, especially if it's not actually connected to USB
11:33 AM cehteh: could be as well
11:33 AM cehteh: you wanted to change it to a crystal less version anyway
11:34 AM LeoNerd: Yeah... once I've built your set of boards, I'll experiment with the G version
11:34 AM LeoNerd: Or C. There's quite a few now
11:34 AM cehteh: btw ... micro usb and through hole mount that surface mount might be a improvement as well
11:35 AM LeoNerd: Eh.. I generally have terrible luck with microusb - something just seems to be less reliable with them
11:35 AM LeoNerd: They break more
11:36 AM cehteh: need to be though hole case mounts, surface sux
11:36 AM cehteh: hah .. usb-c ftw!
11:36 AM cehteh: jk .. will cost a lot more and be pita to solder
11:36 AM LeoNerd: Oh.. I have throughhole USB miniB on the current probes
11:37 AM LeoNerd: I couldn't quite fit throughhole on the 328PB boards though and manage to squeeze it into the board space
11:37 AM cehteh: :)
11:39 AM cehteh: surface mounted connectors are always a failure point
11:41 AM LeoNerd: But perhaps when I get a CH340C (or G) version working, I'll swap to micro
11:42 AM LeoNerd: Yah
11:43 AM LeoNerd: I'd settle for a hybrid - throughhole shield anchor but SMD connections
11:43 AM cehteh: yes
11:45 AM cehteh: usb-c would be damn cool, no hazzle plugging
11:48 AM cehteh: but i doubt you get those for reasonable prices .. or are there variants which only route the usb2 pins?
11:48 AM cehteh: https://www.mouser.de/ProductDetail/JAE-Electronics/DX07S024JJ2R1300?qs=sGAEpiMZZMulM8LPOQ%252byk4BYVF9l%2fdMiNcghbGpud%2fdAeFpkUgeySw%3d%3d
11:49 AM cehteh: woah-that-pads :D
02:47 PM cehteh: LeoNerd ah .. i dont need the analog parts currently, but when you redesign the pcb anyway, then try to make at least pads for AVCC decoupling and C for AREF
02:50 PM LeoNerd: There's a cap on AREF
02:50 PM LeoNerd: There just isn't separate AVCC
02:51 PM LeoNerd: Hangon, does the 328PB even have separate AVCC?
02:51 PM LeoNerd: Ohyeah, there it is
05:48 PM cehteh: LeoNerd: datasheet suggest to decouple it with LC
05:50 PM cehteh: for the cap on aref, i havent checked the datasheet, some AVR's require one to set a flag when there is a cap
05:53 PM LeoNerd: Ahrighty.. well, the cap's definitely on the board
05:53 PM LeoNerd: and the 328PB doesn't talk about needing a flag for it
06:12 PM cehteh: ok
06:12 PM cehteh: well i dont do analog stuff
06:12 PM cehteh: this time
07:22 PM LeoNerd: If I'm using onboard ADC at all, it's usually just for things like battery monitoring, or analog button reads
07:23 PM LeoNerd: For any real instrumentation I use an actual ADC chip.. the onboard one is almost universally terrible
07:30 PM rue_mohr: what do you need to know
07:39 PM cehteh: its as good as 10bit is, not pretty much but not too terribly for simple things either
07:50 PM cehteh: mhm is it erase or write to a eeprom cell which wears it more? aka when i want to kill a cell deliberately, erasewrite in a loop or only erase?
07:54 PM cehteh: mhm about 6 minutes to kill a byte/address on eeprom when doing that on best speed :D
10:25 PM rue_mohr: internal eprom or external chip?
11:47 PM day__ is now known as day