#avr Logs

Jun 30 2019

#avr Calendar

09:10 AM davor_ is now known as davor
10:45 AM Igloo_ is now known as Igloo
01:33 PM davor_ is now known as davor
01:56 PM LeoNerd: Anyone know any way to talk to the folks at Microchip about the new ATtiny chips? I have a few bits of feedback, and wondering how I might get in contact for that
01:56 PM LeoNerd: I'm sure we used to have a field engineer from Atmel one time ago, but not these days
03:17 PM polprog: yeah, whats up rue
03:17 PM rue_mohr: did you see the latest maul?
03:17 PM rue_mohr: http://ruemohr.org/~ircjunk/projects/tiltnpanmirror/slide.htm
03:17 PM polprog: nope
03:18 PM * polprog eyeballs
03:18 PM rue_mohr: thumb on the top left prechaches the next image
03:18 PM rue_mohr: so the switch is instant
03:18 PM polprog: nice
03:18 PM rue_mohr: and, if there is a readme.txt in the folder, it lumps it at the bottom
03:18 PM polprog: neato
03:18 PM rue_mohr: my question to you is, what would you suggest to get the text to wrap properly
03:19 PM rue_mohr: throw it in an 80% wide table?
03:19 PM polprog: maybe a div, tables are frowned upon
03:19 PM rue_mohr: tables are oldschool tho, right?
03:19 PM polprog: ginmme a sec
03:19 PM rue_mohr: k
03:19 PM rue_mohr: I was looking at css stuff for text wrapping but what I was finding didn't add up like when your searching for the wrong keywords
03:20 PM polprog: i think putting it in a <p> instead of <pre> does all the job
03:20 PM polprog: wraps nicely
03:20 PM polprog: you loose trailing spaces and indent unfortunately
03:21 PM rue_mohr: thats fine
03:21 PM rue_mohr: I was kinda kicking myself for not having started with readme.htm
03:21 PM rue_mohr: then I could jab html as the description text
03:21 PM rue_mohr: not entirely too late
03:24 PM polprog: yeah you could make an empty div and just load the .htm using .innerHTML function
03:24 PM rue_mohr: ... it does
03:25 PM rue_mohr: heh
03:25 PM rue_mohr: there is a hidden frame that I have loaded up with readme.txt, if it succeeds, it triggers javascript that checks if its my 404 page and if not, rewrites the otherwise blank descition
03:26 PM polprog: right
03:26 PM rue_mohr: it seemed tidier than haing the javascript to do a GET, and then going thru all the status stuff and then checking if it was my 404
03:26 PM rue_mohr: (my 404 page loads with 200 status !??!?!)
03:27 PM rue_mohr: that took a while to figure out
03:29 PM polprog: 404 loads with a 200?
03:29 PM polprog: hmm
03:29 PM polprog: are you running apache?
03:30 PM rue_mohr: yea, I have a custom 404 page, but the reply is 200
03:30 PM rue_mohr: http://ruemohr.org/~ircjunk/sdfsad.sdf
03:30 PM rue_mohr: check it out
03:30 PM polprog: i think thats a simple .htaccess entry or something to change that
03:31 PM polprog: seen it :D
03:31 PM rue_mohr: k
03:31 PM polprog: love the robot on the motherboard
03:31 PM rue_mohr: :)
03:31 PM rue_mohr: mascott
03:31 PM rue_mohr: should get into more things
03:33 PM polprog: yeah, i feel a deficit as well
03:33 PM polprog: i havent really finished a project recently
03:33 PM polprog: im doing some BSD stuff, but its halfway thru and i see no end.
03:33 PM polprog: the autonomous/remote barge is stalled
03:34 PM polprog: shit sucks
03:53 PM vmt: uff, bsd and javascript mentioned
04:18 PM con3: guys I can't flash this atmega using arduino..need some help
04:25 PM polprog: one of them is the most important software project of the humanity
04:25 PM polprog: the other is just a scripting language for webshites
04:25 PM con3: so I'm using one of these to flash it : https://www.ftdichip.com/Support/Documents/DataSheets/Modules/DS_LC231X.pdf
04:26 PM con3: I'm using the cn11 pins
04:26 PM con3: he used a ATMEGA328P-AU, so I selected an uno in the board list of the arduino ide
04:26 PM con3: he has ftdi and bootloader burn pins
04:27 PM polprog: does the atmega have an arduino bootloader?
04:27 PM con3: It should, it's currently running arduino bootloader
04:28 PM polprog: so what happens when you try flashing it
04:28 PM rue_mohr: did you hold down the reset button, click "upload" and then release the reset?
04:29 PM polprog: that shouldnt be necesary but it helps
04:31 PM con3: rue_mohr: I did
04:31 PM con3: but it doesn't respond
04:31 PM rue_mohr: ok, did the chip come with an avr bootloader or your trying to flash that onto it using the ftdi adapter
04:32 PM polprog: whares the chip from
04:33 PM con3: It's a previous person that built a custom board.. It currently has code on it that was written with arduino, I've just made minor changes and want to reflash it...
04:34 PM con3: will try again and pop the error message here
04:36 PM polprog: pop them to some pastie
04:36 PM polprog: like paste.debian.net
04:37 PM con3: eh, something on the board is on fire
04:38 PM rue_mohr: yup, thats sounds right
04:38 PM polprog: couldnt find the uni website original
04:38 PM polprog: so here it is
04:38 PM polprog: https://www.netfunny.com/rhf/jokes/96/Jun/nosmoke.html
04:38 PM rue_mohr: cause the power is backwards?
04:40 PM rue_mohr: hahah, brilliant work on the other end!
04:40 PM con3: wtf
04:41 PM rue_mohr: con3, we need to know more about what you have going to help ya
04:41 PM con3: rue_mohr: Sorry I know, just trying to figure it out myself, this guy didn't document anything. Trying to figure it out so I can ask specific questions
04:42 PM rue_mohr: knowing whats on fire would be a good start, but otherwise pictures of how you connected things and text pastes of errors to sites like http://paste.debian.net/
04:44 PM rue_mohr: polprog, I bet you it was elna caps...
04:45 PM rue_mohr: if they were on the AC power filter, they smoke, but everything keeps working ok
04:45 PM polprog: lol
04:45 PM rue_mohr: my apple IIe did that
04:45 PM con3: ok...tried it on two boards. looks like the buck regulator. going to pop a portion of the schematic and pcb on here.
04:45 PM rue_mohr: I turned it off pretty fast after the smoke, but when I tried things later, it all still worked
04:46 PM * con3 's finger hurts
04:46 PM rue_mohr: carefull if the buck regulator shorts, it'll send high voltage to all the tender bits
04:46 PM con3: https://imgur.com/a/2lJZzU5
04:46 PM con3: here's how he has the atmega coupled to the ftdi
04:48 PM con3: https://imgur.com/a/Eaxx3QL
04:48 PM con3: this is the ftdi chip, the cn11 pins line up directly with his ftdi pins, so I'm connecting them directly
04:49 PM con3: so if you look at his ftdi and cn11 of the ftdi I'm connecting pin 1 to 1, 2 to 2, etc
04:50 PM con3: the connection seems fine right?
04:53 PM con3: oh I did shift the header so that VBUS is on 3.3V
04:54 PM rue_mohr: it looks fine, but I think you need to do the reset-release thing when it goes to flash it, and make sure your set to the right type of board (for the right avr chip)
04:54 PM rue_mohr: yea, whats smoking aigan?
04:54 PM salcedo: where is RTS on the ftdi going in the schematic?
04:55 PM con3: rue_mohr: is the txd and rxd connecting correctly?
04:56 PM salcedo: ftdi header has RTS that goes to nothing else in the schematic you posted
04:56 PM con3: salcedo: https://imgur.com/a/3jkOyyo
04:57 PM salcedo: ah ok
04:57 PM con3: the ftdi chip's reset is RTS and the reset pin of the avr is /RESET
04:57 PM con3: something with the way I'm connecting the ftdi doesn't seem right
04:58 PM con3: things go on fire as soon as I couple it
04:58 PM salcedo: i recently had this issue with an atmega644p that i have on a breadboard right now
04:58 PM salcedo: using an FTDI (not exactly ftdi but same deal)
04:58 PM salcedo: DTR isn't exposed, only RTS. avrdude is supposed to use both DTR and RTS to reset though.
04:58 PM salcedo: i couldn't get the bootloader to respond to me at all after i burned it via spi
04:59 PM salcedo: got led blinking 3 times, so i know the bootloader is there... still no luck over serial.
04:59 PM con3: shit I think rxd and txd should be the other way around
04:59 PM salcedo: it's connected properly too because i can transfer data. just can't reset it.
05:00 PM con3: screw the guy who made this board
05:00 PM salcedo: at least he exposed "bootloader burn header" :)
05:00 PM salcedo: you can use that to flash your code too
05:01 PM con3: hmm.. ok as soon as I connect gnd and vbus the buck converter is hooooot
05:02 PM salcedo: designed and had a board fabricated without testing it on a breadboard first? :)
05:03 PM con3: salcedo: it's not my board
05:03 PM con3: it's a working board that I just need to reflash
05:03 PM salcedo: obviously it's not working if shit is on fore
05:03 PM salcedo: *fire
05:03 PM con3: someone else needs to use it, the guy who built it left it here with the code and really crappy docs
05:03 PM con3: it works, 100%. I just can't reflash it
05:04 PM salcedo: do you have a spare arduino uno or bus pirate or the like?
05:04 PM con3: just checking whether the board works, one sec
05:05 PM polprog: nighers
05:05 PM polprog: nighters*
05:07 PM con3: yeah the board works
05:08 PM salcedo: the bootloader allows you to flash over uart and also ensures chip-erase doesn't occur, which would cause the bootloader to be erased too.
05:08 PM salcedo: you don't actually NEED the bootloader if you have that Burn_Bootloader_Header exposed.
05:09 PM salcedo: you can just hook up directly to the atmega328's SPI pins and use avrdude to flash your code directly.
05:10 PM salcedo: if you go that route, be sure to update the fuse so the reset address points to the start of application memory and not bootloader.
05:11 PM con3: ftdi route is definetly not working. How would I use the bootloader header?
05:11 PM salcedo: you don't _have_ to do that though because, after chip-erase, the bootloader section will be full of 0xFF's. 0xffff opcode is harmless and should cause it to loop back to application anyway.
05:11 PM salcedo: you'll need something that can speak spi
05:11 PM salcedo: preferrably another arduino. an actual arduino.
05:12 PM con3: dammit, i'll need to get one in a few hours
05:12 PM salcedo: i suspect there's no bootloader on that board.
05:13 PM con3: salcedo: there's arduino code running on it rn
05:13 PM salcedo: "arduino code" doesn't need a bootloader to run.
05:13 PM con3: but I know 0.1% about arduino's and avr's
05:13 PM salcedo: it's possible the person who put the code on it flashed over the bootloader_burn_header to begin with and didn't flash the bootloader.
05:13 PM con3: ah I thought you need to flash them with the arduino bootloader
05:13 PM con3: salcedo: i wouldn't be surprised
05:14 PM salcedo: so if you have ANY kind of microcontroller that can run arduino code on you, you can use it to connect to that header and flash the board
05:14 PM salcedo: as in microcontroller i mean "dev board"
05:14 PM salcedo: like arduino uno
05:15 PM con3: salcedo: any link you can give me to show me how to do that? I have a leanardo somewhere
05:15 PM salcedo: a leonardo will work
05:15 PM salcedo: https://www.instructables.com/id/Program-ATmega-328-Using-Arduino-Arduino-As-ISP/
05:16 PM salcedo: basically all this does is creates a serial<->spi bridge for avrdude to do its thing.
05:16 PM salcedo: you can skip all the leds and shit. they're just for status.
05:22 PM con3: salcedo:Thanks alot, really appreciate it !
05:31 PM con3: just so annoyed about how poorly he documented everything
06:51 PM Smashcat: Hi, anyone here use the eeprom library in atmel studio? Seems like there's a bug where it writes to the wrong address with an ATMega328pb!
06:56 PM rue_mohr: external eeprom?
06:57 PM Smashcat: No, internal. Writing to 2 adjacent locations, the second write overwrites the first. Thought it was a code bug on my side, but pared it down and can see it's changing the wrong location.
06:58 PM Smashcat: (it also writes to the second location, weirdly)
07:24 PM rue_mohr: huh
07:31 PM Smashcat: Desoldering the chip at the moment, going to try another.
11:18 PM day__ is now known as day