#avr Logs

Jan 15 2019

#avr Calendar

01:05 AM rue_mohr: http://ruemohr.org/~ircjunk/images/p1090936.jpg
01:51 AM polprog: Hehe cool
02:59 AM polprog: rue_mohr: is that one of those LCD-controller avrs?
07:26 AM janco: Hi guys. What's the best way to develop for a attiny on linux ?
07:26 AM janco: Tools etc.
07:27 AM polprog: in c or in assembly?
07:27 AM polprog: Gcc-avr is the de facto standard
07:27 AM polprog: And libc-avr
07:27 AM polprog: Avr-gcc*
07:31 AM nohit: avrs.fi
07:31 AM nohit: https://emil.fi/avr
07:42 AM polprog: ^
07:54 AM janco: c/cpp
07:55 AM janco: Yeah I understand to use avr-gcc
07:55 AM janco: But more like tools / ide's
07:55 AM janco: debug things
07:55 AM janco: I mean, clion is great
08:35 AM polprog: I just use a text editor
08:35 AM polprog: Used to use eclipse with its avr plugin
09:08 AM rue_mohr: polprog, its a lcd from a broken stereo I found in a scrap metal pile, it was in one peice, so I thought I'd take it home and see if I could hack it, it was fun
09:09 AM rue_mohr: janco, use whatever ide you want,
09:09 AM rue_mohr: I'm not a good one to talk to about debugging, I use a debug pin with a led or scope, I dont believe in reverse eningeering the code you wrote to find a problem
09:19 AM polprog: Im all for leds and printfs and scopes when debugging
09:19 AM polprog: rue_mohr: any particular protocol this lcd speaks?
09:19 AM LeoNerd: debug-by-LED is a fine technique
09:19 AM polprog: Or just bitbanging?
09:19 AM polprog: Hey LeoNerd
09:20 AM LeoNerd: Afternoon
09:20 AM * polprog was adding printfs to debug the netbsd kernel yesterday
09:22 AM LeoNerd: I gave a conference talk a little while ago on the similarities and differences between programming and electronics. Debug-by-printf/LED was one of my themes
09:22 AM LeoNerd: For all the fancy tooling in the world, often a well-placed print or "wiggle that GPIO line" does perfectly fine
09:22 AM rue_mohr: polprog, its serial, but what you get is just raw segment control
09:23 AM janco: can I do printf over the isp programmer
09:23 AM rue_mohr: they grouped the 7 segment with junk inbetween
09:23 AM janco: or only to the uart pins
09:23 AM janco: ?
09:24 AM rue_mohr: janco, printf is actually likley to double the size of the code your putting on the microcontroller,
09:24 AM rue_mohr: you can send characters
09:25 AM rue_mohr: provided its not an attiny that doent have a uart
09:25 AM LeoNerd: For those tiny chips lacking a UART (or on chips with one but in use for other things) I like to use a small no-resources transmit-only bitbanging UART implementation I keep
09:26 AM LeoNerd: Handy for little debugging "print a number" sort of situations
09:27 AM polprog: Printf is heavy, thats true.
09:28 AM polprog: I ususally draw up a simple blocking puts function
09:28 AM rue_mohr: if I'm hit with a really good one of those "written at 5am and I cant see the code error" bugs, I also ahve a 196 led strip thats synchronous serial
09:30 AM janco: Well I've bought a few attiny 414
09:30 AM janco: These have uart
09:30 AM LeoNerd: It's quite rare not to have a UART these days; all of the newer tinies have.. it's mostly just some of the older small ones that lack them
09:30 AM LeoNerd: 4313 has a UART and almost nothing else
09:33 AM rue_mohr: as long as its not a usi
09:34 AM rue_mohr: as my experience with them sofar is that they are a shift register you usually have to clock youself with code
09:36 AM rue_mohr: it acatually surprises me that there hasn't been development of 16 bit serial
01:40 PM jancoow: Hey. So I'm trying to program my attiny515
01:40 PM jancoow: 414*
01:40 PM jancoow: However, avrdude doesn't list this mcu
01:43 PM jancoow: https://jancokock.me/f/959d5
01:43 PM jancoow: so how can I programm it?
01:45 PM Thrashbarg: are you specifying the target device? What command are you using
01:45 PM jancoow: avrdude -p ATtiny414 -e -U flash:w:test.hex:i -c avr910 -P /dev/ttyUSB0
01:45 PM Thrashbarg: try updating AVRdude
01:45 PM jancoow: I connected "mysmartusb" isp programmer to the reset, mosi, miso and sck
01:46 PM jancoow: I'm on the newest version
01:46 PM jancoow: 1:6.3-3
01:47 PM Thrashbarg: "Programmer supports the following devices:" <-- which would suggest the programmer doesn't know waht an ATtiny414 is
01:47 PM jancoow: I'm able to program it through isp right?!
01:48 PM jancoow: Otherwise I'm unable to programm al my pcb's
01:48 PM jancoow: So with which programmer can I programm it?
01:48 PM Thrashbarg: you can program it via ISP. Perhaps the programmer firmware needs updating
01:49 PM jancoow: I can only find something about UPDI in the documentation..
01:49 PM jancoow: Dunno what that is
01:55 PM jancoow: I've no clue how to programm this mcu.
01:55 PM Thrashbarg: tried the stk500 protocol?
01:55 PM jancoow: Apparently this attiny cannot be programmed with ISP
01:55 PM jancoow: I can't find anything in the documentation
01:57 PM Thrashbarg: ah I see, newfangled Microchip stuff
01:57 PM Thrashbarg: looks like you need a programmer that supports UPDI
01:58 PM jancoow: <.<
01:58 PM jancoow: Great
01:58 PM jancoow: But can I still use my pcb's?
01:58 PM jancoow: I only have reset, mosi, miso and sck exposed
01:58 PM jancoow: oh and RX/TX
01:59 PM Thrashbarg: looks like it's programmed through /RESET
01:59 PM Thrashbarg: I'm completely unfamiliar with this sort of thing :P
01:59 PM jancoow: Me too
01:59 PM jancoow: I've programmed a few atmel chip a few years ago
01:59 PM jancoow: Which was kinda easy
02:00 PM Thrashbarg: yeah since Microchip bought out Atmel they've been screwing with the design in new chips
02:00 PM jancoow: But luckly it can be programmed through reset
02:00 PM Thrashbarg: yea
02:00 PM jancoow: So I still can use my pcb's
02:01 PM jancoow: I could have choosen a chip with lower pin count in the end tho
02:01 PM jancoow: What the hell
02:02 PM jancoow: Atmel ice cost 130 euro's
02:03 PM jancoow: https://github.com/mraardvark/pyupdi but this is cool!
02:04 PM Thrashbarg: yeah just looking at that
02:04 PM Thrashbarg: needs a TTL serial interface
02:04 PM jancoow: Well that's something I got
02:04 PM Thrashbarg: ok
02:08 PM jancoow: Well gota go now. Will try this tommorow
02:08 PM jancoow: Would be cool if I can programm this so easily without buying a kit of 150 euros
04:05 PM Maya-sama is now known as Miyu
06:13 PM Maya-sama is now known as Miyu
09:17 PM rue_bed: there are about a million cheap ways to program an avr
09:18 PM rue_bed: I still have a few parallel port programmers
11:58 PM day__ is now known as day