#avr Logs

Feb 23 2019

#avr Calendar

12:52 AM [1]MrMobius is now known as MrMobius
03:05 AM god is now known as atk
10:41 AM cehteh: whats the fastest way top flash a avr? using usbasp it takes 20secs per chip, are there programmers which work much faster?
10:44 AM LeoNerd: My Pololu v1 is pretty quick
10:45 AM LeoNerd: Though: I discovered recently: it comes with a *terrible* USB cable. I always thought it odd, being so thin
10:45 AM LeoNerd: Turns out it's below-spec gauge wire. So the voltage dropouts are bad
10:45 AM LeoNerd: It doesn't program some boards, simply because of that. Swap it for a decent cable and all is fine
10:45 AM cehteh: yeah i had troible with bad usb cables in the past with some rather strange bugs
10:45 AM LeoNerd: ... the fact the onboard voltmeter claims 5.01V rather than the ~4.50V it used to work at, is also a clue ;)
10:46 AM LeoNerd: Seriously... 500mV drop when *idle*
10:46 AM cehteh: protection diode
10:46 AM LeoNerd: No that's just from swapping the cable
10:46 AM LeoNerd: Using a proper cable it claims 5.01V
10:46 AM cehteh: well yes strange
10:46 AM cehteh: calls for brownout
10:47 AM cehteh: otherwise 4.5V should be fine
10:47 AM LeoNerd: Yah, but that was only when idle. I think when it was doing programming, the sudden extra surges of current knocked it out occasionally. I have entire boards I just mysteriously couldn't program with it
10:47 AM LeoNerd: But now magically all work when using a better USB cable
10:48 AM cehteh: isnt the pololu just a avrasp?
10:48 AM LeoNerd: Nope
10:48 AM cehteh: but avrdude supports it?
10:48 AM HighInBC: throw way bad usb cables, they will only frustrate you
10:48 AM LeoNerd: It's a PIC-based thing. Over USB it looks like a regular USB-attached serial port, talking to an stk500
10:48 AM LeoNerd: So you talk the real STK500 protocol to it, and it does nice things
10:48 AM cehteh: ah
10:48 AM LeoNerd: It's none of that silly usbasp crap
10:49 AM LeoNerd: HighInBC: Oh indeed so. It just took me a while to realise that's what the problem was
10:49 AM cehteh: except from the speed and bad usb cables i haver had problems from usbasp's
10:49 AM cehteh: https://www.amazon.de/Pololu-USB-AVR-Programmer-v2-1/dp/B07F3CZTRZ/
10:49 AM LeoNerd: Yeah, they're OK enough, just a bit slow. I can clock my pololu a lot faster
10:50 AM cehteh: guess v2.1 is ok too
10:50 AM LeoNerd: That's the v2. I imagine it's as good as the v1 I have, but I haven't tried it to know for sure
10:50 AM cehteh: ok i give it a try
10:50 AM LeoNerd: I turned my v1 into a selfcontained fancy box
10:50 AM LeoNerd: It has power control (5V and 3.3V), OLED voltage/current readout, and secondary serial port
10:50 AM LeoNerd: in FTDI standard layout
10:51 AM cehteh: i dont need that, i just want faster flashing
10:51 AM HighInBC: get a trench coat
10:51 AM LeoNerd: ;)
10:51 AM cehteh: tat wont impress the AVR chips
10:53 AM cehteh: currently i use my old trusted avrisb i once covered in hotglue and transparent shrinktube .. works pretty well and is rugged, but i cant update its firmware unless i open that cover :D
10:54 AM jancoow: cehteh:
10:54 AM jancoow: hey
10:55 AM HighInBC: isopropanal will make short work of hot glue
10:56 AM cehteh: nit really, and i dont want to remove it, these things are so cheap i rather keep it as 'working' spare and buy new ones
10:56 AM cehteh: hence i asked for faster alternatives .. some china usbasp order got canceld
10:56 AM cehteh: ordered the pololu thing now lets see
10:57 AM cehteh: jancoow: finished your led thing?
10:57 AM jancoow: cehteh: yes! It fully works
10:57 AM cehteh: nice
10:57 AM jancoow: cehteh: I'm for some reason unable to program it anymore, so there is a small bug in it
10:58 AM jancoow: The last uart bit (for channel 3 fade value) is written outside the array now :P But it still works lols
10:58 AM cehteh: had that problem with someone else .. turns out to be a damaged µC .. overload/brownout
10:59 AM cehteh: eww
10:59 AM jancoow: now I'm working on the 230v thiny
10:59 AM jancoow: everything works so far
11:00 AM cehteh: be careful
11:00 AM jancoow: haha yeah
11:00 AM jancoow: do you want to see the board?
11:00 AM cehteh: no :D
11:00 AM jancoow: there where 2 issues in the design but I could solve it pretty easily :D without cutting traces or wires
11:01 AM jancoow: cehteh: well if you want to: https://jancokock.me/f/7d0b0/ only one channel soldered on yet
11:01 AM jancoow: https://jancokock.me/f/58f16/
11:01 AM jancoow: :D
11:01 AM elektirnis: not an AVR, but anyone tried to mess around with rebble?
11:02 AM jancoow: cehteh: and this is the output of the Zero Cross: https://jancokock.me/f/c91ce/ which looks good :D
11:02 AM cehteh: ok
11:03 AM * cehteh gone for perfboard for the prototype before making pcb's
11:03 AM cehteh: https://public.pipapo.org/PrototypeBoard.jpg
11:03 AM jancoow: that looks cool
11:04 AM jancoow: I'm having a problem getting the zero cross interupt working tho :/
11:04 AM cehteh: not as pretty, but worked on the first try, even i dont have the hardware here, doing blind programming for a customer just datasheets and scoping
11:05 AM cehteh: do you use input capture for zerocross?
11:05 AM jancoow: That's what I'm trying to do
11:05 AM jancoow: I put it on sense falling edge
11:06 AM cehteh: and how do you interface the signal. is that already 5V digital?
11:06 AM jancoow: but it looks like it's not triggered
11:06 AM jancoow: it's a 3.3v signal
11:06 AM jancoow: which is 1ms low every zero cross
11:06 AM cehteh: test with a switch, possibly you forgotten to initialize something
11:07 AM jancoow: https://jancokock.me/f/6af57/ is the code :/
11:07 AM cehteh: possibly doesnt matter but your signal may trail the real zero a slight bit, + isr latency and stuff
11:07 AM jancoow: The zero cross is on PA-5
11:07 AM cehteh: ideally you do some kind of software PLL and correct this latency
11:08 AM jancoow: well first I got to fix the interupt not? :P
11:08 AM jancoow: I'm testing it with a switch like you said
11:08 AM cehteh: yeah
11:08 AM cehteh: and the api of the chip you have thee is just strange
11:08 AM jancoow: what?
11:09 AM cehteh: i have some input capture code in my cppm driver, but it looks vastly different
11:09 AM cehteh: newfangeld microchip fuckup
11:09 AM jancoow: yes and I can't find an example anywhere
11:09 AM jancoow: this *should* be working
11:09 AM cehteh: read datasheets
11:09 AM cehteh: it does not :D
11:09 AM cehteh: is the low level really low?
11:10 AM jancoow: I'm going to print the input
11:10 AM cehteh: not just low for your logic analyzer
11:10 AM jancoow: to check if it's even measuring right
11:10 AM jancoow: it wasn't a logic analyzer, it was a raspberry pi :P
11:10 AM cehteh: whatever
11:12 AM cehteh: eh you dont use input capture, but just pinchange or?
11:13 AM jancoow: sprintf(str, "Steps: %d \n\r", PORTA.IN & 0b00010000); ~ correctly shows that it's zero when I connect it to ground
11:13 AM jancoow: so that's okay I guess
11:13 AM jancoow: and now it'
11:13 AM cehteh: you possibly forget to init/mask the pinchange somehow
11:13 AM jancoow: and now it's randomly spamming 'A' -.- "
11:14 AM cehteh: i havent looked closely :D
11:16 AM jancoow: have to go now :/ Be back in a hour :)
12:23 PM jancoow: cehteh: i'm back :D
01:09 PM davor_ is now known as davor
08:16 PM [1]MrMobius is now known as MrMobius
09:54 PM gsi__ is now known as gsi_
11:29 PM day_ is now known as day