#avr Logs

Sep 18 2018

#avr Calendar

02:21 AM skz81: <rue_mohr> ok, but next time you see silence, troll someone ok? >> PICs are f*cking GREAT !!!
02:28 AM Thrashbarg: troll harder
02:29 AM skz81: Microchip for the win !!
02:29 AM Thrashbarg: 4 clock cycles per instruction is better than 1!
02:41 AM polprog: i really believe CISC is the proper ISA architecture. we should focus on developing a hardware lisp implementation
02:41 AM polprog: </s>
02:54 AM skz81: or an hardware java VM
02:57 AM polprog: yes!
08:25 AM davor: on a t44, if I want to use USI in three-wire mode, and only use DO, can I still use DI and USCK pins as general purpose I/O as per their settings in the port registers?
08:52 AM rue_mohr: davor, I think your stuck with di and do
08:52 AM rue_mohr: iirc its both or nothing
08:52 AM rue_mohr: but, you can prolly bit-bang with a tiny bit of code
08:53 AM rue_mohr: dont you need to execute an instruction to send a bit with the usi anyhow?
08:54 AM polprog: if you need to use only one pin then bitbanging might be the only option
08:54 AM rue_mohr: my recollection of the usi on a tiny is that it takes less code to bitbang
08:55 AM rue_mohr: debian is an amazing project, arduino isn't popular enough to have included as a package
09:03 AM LeoNerd: Using USI as an SPI master is about equivalent to just bitbanging, but it does help for I²C, and SPI slaves
09:06 AM rue_mohr: no, I was looking at the amount of code to use the usi for i2c, and its stupid
09:07 AM rue_mohr: flurrys code to bit-bang it is WAY smaller
09:08 AM rue_mohr: how do they manage to make hardware thats to horrid to use that its actaully easier and more space efficient to bit bang it????
09:08 AM LeoNerd: I suspect the difference may be how "correct" your I²C implementation is; if it actually supports clock-stretching or multimaster arbitration, for example
09:08 AM rue_mohr: iirc flurry does clock stretching
12:45 PM [1]MrMobius is now known as MrMobius
04:26 PM davor_ is now known as davor
07:44 PM retrosenator: anyon used attiny412?
07:44 PM retrosenator: it is a new part and my avr-gcc doesn't have it listed
07:44 PM retrosenator: not sure if c can work on 256 byte ram?
07:44 PM rue_mohr: not me
07:45 PM rue_mohr: whats a tiny13 got, I'v pulled a few things n C with that
07:47 PM retrosenator: i need i2c
07:47 PM retrosenator: and none of those have it
07:47 PM rue_mohr: thats ok
07:47 PM retrosenator: the attiny412 has adc, dac, i2c, spi etc
07:48 PM retrosenator: and it cost the cheapest of all avr and can do 20mhz
07:48 PM rue_mohr: its faster and takes less code space to use flurrys library
07:48 PM rue_mohr: that bit-bangs i2c
07:48 PM retrosenator: software i2c
07:48 PM retrosenator: nice idea
07:48 PM rue_mohr: yea, it takes less code space than using the hardware on the tinys
07:48 PM rue_mohr: FLURY
07:48 PM retrosenator: it works with 64bytes ram?
07:48 PM rue_mohr: i2c, look it up
07:48 PM rue_mohr: yea
07:48 PM rue_mohr: it'll work with 4
07:49 PM retrosenator: it's asm only
07:49 PM rue_mohr: the code taught me things
07:49 PM rue_mohr: no
07:49 PM rue_mohr: its asm, with a C wrapper
07:49 PM rue_mohr: you can do the calls from C just fine
07:50 PM retrosenator: nice
07:50 PM retrosenator: really less code space than hardware i2c?!
07:50 PM retrosenator: that would be incredible
07:51 PM rue_mohr: yes
07:51 PM rue_mohr: it takes a stupid amount of code to use the hardware i2c
07:51 PM retrosenator: oh
07:53 PM retrosenator: stil the attiny412 looks superior in every way
07:53 PM cehteh: retrosenator: C can work with 64byte ram
07:53 PM retrosenator: only that it's not support by avr-gcc
07:54 PM retrosenator: cehteh: what is the minimum?
07:54 PM cehteh: there are tinys without any ram, someone hacked stuff in C for those
07:54 PM cehteh: with some tricks
07:54 PM cehteh: otherwise its up to you
07:54 PM cehteh: function calls will be expensive/prohibited unless inlined
07:55 PM retrosenator: yeah
07:55 PM cehteh: well tiny13 has 64 byte ram or? i used it frequently
07:55 PM retrosenator: they put the stack in registers?
07:55 PM cehteh: yes
07:55 PM retrosenator: nice
07:55 PM retrosenator: so you can call a few functions but not too many
07:55 PM cehteh: a few might be already a stretch :D
07:55 PM retrosenator: just one at a time
07:55 PM retrosenator: lol
07:56 PM cehteh: completely up to you
07:56 PM retrosenator: what about floating point?
07:56 PM retrosenator: it's difficult to fit it in 1kb flash
07:57 PM retrosenator: ok, nvm, use fixed point
07:58 PM retrosenator: or just build avr-gcc from source to support attiny412
07:58 PM retrosenator: but even then maybe software i2c is better
07:59 PM cehteh: why do you want to use that? why not a tiny45/85?
07:59 PM cehteh: oh ok hardware multiplier
08:01 PM cehteh: doesnt look bad, but without some project which really utilizes its features it wont be reasonable to use
08:02 PM retrosenator: apparently the new attiny parts use pic style periphials
08:02 PM retrosenator: which makes them incompatible with existing code for other avr
08:02 PM retrosenator: cehteh: cheaper more memory too
09:23 PM retrosenator: the flurry i2c code is master
09:23 PM retrosenator: i need slave
09:37 PM rue_mohr: yea, their screwing things up good now
09:37 PM rue_mohr: did flurry do a slave library?
09:37 PM rue_mohr: thoguht he did
09:48 PM ColdKeyboard: I'm trying to flash ATTiny85 with BusPirate. When I use avrdude -c buspirate -P COM16 -p attiny85 -v I get the rc=-2 error. I'm sure my connections are correct and working... Did anyone get buspirate to work with avrdude?
09:48 PM ColdKeyboard: btw AvrDude is v5.10 and buspirate has fw v6.1
09:49 PM retrosenator: usi can be slave I guess
09:51 PM rue_mohr: usi sucks
09:51 PM rue_mohr: bit bang it, really.
09:52 PM rue_mohr: ColdKeyboard, are you sure the buspirate is on com16?
09:52 PM ColdKeyboard: Yeap. Opened it up, sent '?' and it responded
09:53 PM rue_mohr: hmm
09:53 PM rue_mohr: tell us about your connections between the buspirate and the 85
09:54 PM theBear: never
09:55 PM rue_mohr: arrrrg, salty bear
09:55 PM theBear: i am known for my salty-old-sea-dog'ness, in some circles <wink>
09:56 PM ColdKeyboard: rue_mohr: CS->RST, MISO, MOSI, SCK, GND, +5 go 1:1 from BP to my board
09:56 PM rue_mohr: and you have a 10k pullup on the rst?
09:57 PM ColdKeyboard: 4K7 but yes
09:57 PM rue_mohr: hmm
09:57 PM theBear: hmmm.... you sure the -P COM16 bit is right and/or needed for b-pirate?
09:58 PM ColdKeyboard: I tried without and it defaults to COM1 for some reason
09:58 PM ColdKeyboard: Also, does buspirate power my device?
09:58 PM rue_mohr: got a multimeter?
09:59 PM ColdKeyboard: Yeap, checked but I don't know how fast it is... Didn't see it go to 5V
09:59 PM ColdKeyboard: Then again if it's on for ~100ms and detects no target, multimeter won't pick that up. At least not my crappy one
10:00 PM rue_mohr: uh, its not always powered?
10:02 PM rue_mohr: you want always powered
10:02 PM ColdKeyboard: Okay, hooked up my power supply so my board is always powered, verified it's getting 5V but buspirate still doesn't show anything
10:02 PM rue_mohr: direct from usb is fine
10:02 PM theBear: hmm... erm, i gonna assume a little, i feel like yer not pointing it at the bus pirate due to not specifying th3e right port
10:02 PM rue_mohr: he confirmed tho
10:03 PM theBear: pirate is usb ? i'd try maybe -P /dev/ttyusb? or usbtty? or wtf it called ?
10:03 PM ColdKeyboard: https://pastebin.com/gdit5vYB
10:03 PM theBear: what os we talkin ?
10:03 PM rue_mohr: winblows
10:03 PM theBear: and i missed the ? (confirmed) line back there
10:03 PM ColdKeyboard: Check it out. It finds BusPirate, reads FW version and all...
10:03 PM theBear: and ignore the /dev/blah vs COM?? in the windy os case
10:04 PM rue_mohr: hmm
10:04 PM rue_mohr: I suspect your connections are wrong then, did you remember to cross miso/mosi?
10:05 PM theBear: what is the bus pirate current and/or any series resistance like ? i've had kinda corner cases where 4k7 is a bit too "hard" for a particular programmer to pull far enough, particularly if there any other stuff connected to that pin for other reasons
10:05 PM rue_mohr: or are you not supposed to, hmmmm I wonder which they took it from
10:05 PM rue_mohr: theBear, often 1k is too hard, I went 10k and havn't had issues with anything
10:06 PM theBear: mmm., the X kriss-kross ('ll make ya, jump jump, u huh uhuh) always one worth triple checking (i know i done it more than once in a row a couple times) but i notice yer said 1:1 BP <> yourboard earlier
10:06 PM theBear: rue_mohr, mmm, and he said 4k7, just in the middle enough to 'maybe-work' <grin>
10:06 PM rue_mohr: it depends how they "meant" the labels
10:06 PM theBear: or err, she, as the case may be
10:07 PM rue_mohr: oo hacker chick??? :)
10:07 PM theBear: http://dangerousprototypes.com/docs/Bus_Pirate_AVR_Programming is the first googley result for whatever i searched earlier (was just looking fer how/if -P applies for buspirate mode) and has a nice clear connectionstable
10:08 PM rue_mohr: so it sounds like it should be 1:1
10:08 PM ColdKeyboard: <rue_mohr> I suspect your connections are wrong then, did you remember to cross miso/mosi?
10:08 PM ColdKeyboard: http://dangerousprototypes.com/docs/Bus_Pirate_AVR_Programming
10:08 PM ColdKeyboard: Yeah, that's the one I used for connecting the board
10:09 PM theBear: rue_mohr, lol i dunno, just been noticing recently i seem to assume male for the purposes of non-propernoun referring to random text nicknames i only known fer 10 minutes, and ya know, i bet that bugs the heck outta any tech-loving girls wading around in this mans-world :)
10:09 PM ColdKeyboard: I previously used usbasp but it died. And now I have the option of buspirate and tarduino
10:09 PM rue_mohr: ok, well, I'll make sure to stick to my $2 usbasp n stuff and NOT try to use a buspirate for programming avrs!
10:09 PM theBear: also you haven't accidentally used a wrong isp/header pinout (vs your board)
10:09 PM theBear: usbasp DIED ? how does one do/avoid that ?
10:10 PM ColdKeyboard: Nope. Confident that wiring is corred
10:10 PM ColdKeyboard: *correct
10:10 PM rue_mohr: the usbasps I have work fine
10:10 PM theBear: hmm, the old "everything is as it should be and everything isn't doing like it should be"
10:10 PM rue_mohr: which I find halarious, cause their so terribly cheap
10:10 PM ColdKeyboard: theBear: Borrowed it to a friend... returned it charcoaled...
10:10 PM theBear: rue_mohr, they just a little 8pin avr basically ain't they ? not a lot to go wrong
10:11 PM theBear: ColdKeyboard, ahh, good answer
10:11 PM rue_mohr: toms programmer is my second fav, the m32u2 board he did is my most favorite
10:12 PM theBear: only my 32u4 little usb-connector-integrated-at-end-of-pcb thing usb programs, otherwise i still use erm, rif's 74245 (245? you know, 8bit buff/holdey kinda one) board from memory
10:12 PM rue_mohr: but its not like that, toms programmer is nativly a 6 pin, the m32u2 I did up as a 10 pin
10:12 PM rue_mohr: most of my stuff is 10 pin
10:12 PM theBear: certainly some "dumb parport bitbanger"
10:12 PM rue_mohr: yup
10:12 PM rue_mohr: I have my parport programmer for the day the world ends
10:13 PM theBear: heck, if i rushing and can't find the buffer i still been known to use the "very naughty" (aka "i'm feeling LUCKY today") 3 resistors and a D25 plug charger
10:13 PM rue_mohr: but honestly , microchip is about to obsolete all the programmers anyhow, for one of their proprietory ones
10:13 PM rue_mohr: thats why I'm moving to stm32
10:13 PM theBear: i'm still working thru my old first-gen at90s stocks and got a few more to get thru before i even think about current atmel/avr stuff and what microchip may have butched in it
10:14 PM rue_mohr: that and their 72Mhz, ... and their cheaper than the m328 based arduino baords...
10:14 PM ColdKeyboard: Wait, does PicKit support ICSP for AVR now?
10:14 PM theBear: erm, i know what avr and some of those words mean, like wiat and does and now :-/
10:14 PM rue_mohr: I dont use the ide's I use a C editor and a makefile
10:15 PM rue_mohr: make; make install
10:17 PM rue_mohr: theBear, your an ozy, you can get away with pulling a Hogan on ColdKeyboard there... I'll put a dime bet on male.
10:18 PM ColdKeyboard: ??
10:18 PM rue_mohr: ColdKeyboard, I have no idea how to help ya
10:18 PM rue_mohr: I'd love to help you set up a loopback and check that its working,
10:18 PM rue_mohr: but I'v not knows how to do that since the parallel port days
10:19 PM ColdKeyboard: Did anyone use Arduino to flash another micro?
10:19 PM rue_mohr: /Hogan/Dundee/
10:19 PM rue_mohr: ColdKeyboard, you can make an arduino into a programmer
10:19 PM rue_mohr: easy
10:19 PM theBear: i got the dundee, but wtf is a coldkeyboard ?
10:20 PM ColdKeyboard: Is dundee award from The Office? :)
10:20 PM theBear: oh, that's the name of this person we both talking to currently, woop
10:20 PM theBear: s
10:20 PM theBear: ColdKeyboard, hehe, the dundie's, classic episode ;-)
10:22 PM rue_mohr: I still cant beleive you cant carry a knife in australia
10:22 PM theBear: now i really confused... which hogan i gonna pull on this poor ColdDuder ? the old '<hmmm, that's a deep voice for a lady> <GROPE> oh, sorry, just checkin' (ya know, the day after you foundout about cross-dressing existing) or the old thumb and little finger massive killer man-cow buffalo thing put-to-sleep manourvere or wtf ?
10:22 PM rue_mohr: almost everyone in canada has a pocketknife
10:23 PM theBear: rue_mohr, up to 2" blade is fine <grin> also more than 2 persons congregating in public qualify as a gang, if the dude writing down what yer did wrong doesn't like yer
10:23 PM rue_mohr: well you said ColdKeyboard might be female, I'm not gonna argue, I'm just sayin, its not in the odds
10:23 PM theBear: mmm, pocketknives are a bit old-fashioned... there just ain't as many opportunities to use one in this modern world
10:24 PM rue_mohr: is if your a sparky
10:24 PM rue_mohr: turnin screws and peelin wire
10:24 PM rue_mohr: maybe the knife I got rif was too big
10:24 PM theBear: rue_mohr, lol, ahhh, so that was just a passing comment back there, not a technical/ISP related one .... i think i followin, 5mins behind, wonderful
10:24 PM rue_mohr: I cant remember but it was a nice one
10:24 PM rue_mohr: he kinda freaked
10:24 PM theBear: pfft, the "FAMOUS TOLEDO" as the sticker i read on my old pair said last night
10:25 PM rue_mohr: I did NOT get him a dundee knife
10:25 PM theBear: sparkie wires are too big and stiff and multi-layered and generally heavy duty for manual stripping when a toledo (style stripper) can do it perfectly in two squeezes
10:26 PM theBear: also stupid few or even single-core fixedinstall/plenum kinda electrical cables are way to stiff and ouchey to be getting all up close and personal with a knife or sidecutter or whatever manual/small stripping technique yer prefer
10:27 PM rue_mohr: avrdude -c buspirate -P COM16 -p attiny85 -v
10:27 PM rue_mohr: wait a min
10:27 PM rue_mohr: ColdKeyboard,
10:28 PM rue_mohr: avrdude -c buspirate -P COM16 -p attiny85 -e -U flash:w:foo.hex
10:28 PM rue_mohr: no
10:28 PM rue_mohr: avrdude -c buspirate -P COM16 -p t85 -e -U flash:w:foo.hex
10:29 PM rue_mohr: >
10:29 PM rue_mohr: ?
10:29 PM rue_mohr: wow, I'm being just useless to myself today
10:29 PM rue_mohr: I jabbed a pipe in the roof...
10:29 PM ColdKeyboard: Same thing... hangs at `Detecting buspirate...` and then after a while it just fails
10:30 PM rue_mohr: ok
10:30 PM rue_mohr: avrdude -c buspirate -P COM16 -b 9600 -p t85 -e -U flash:w:foo.hex
10:30 PM ColdKeyboard: but BP is 115200, no?
10:31 PM rue_mohr: ok
10:31 PM rue_mohr: avrdude -c buspirate -P COM16 -b 115200 -p t85 -e -U flash:w:foo.hex
10:31 PM theBear: wait, you saying when yer add something like -e and/or -U blah:w:foo.hex to the cmdline it STOPS detecting the buspirate like it did in the pastebin ?
10:32 PM ColdKeyboard: Nope, you are missing -v. But it detects it and doesn't do anything
10:32 PM ColdKeyboard: Adding -v produces the exact same output as in pastebin
10:32 PM rue_mohr: avrdude -c buspirate -P USB -p t85 -e -U flash:w:foo.hex
10:32 PM rue_mohr: I want a loopback test!
10:33 PM ColdKeyboard: avrdude: ser_open(): can't open device "USB": The system cannot find the file specified.
10:33 PM theBear: cos so long as yer got a -c buspirate and -P COM16, it should ALWAYS find that buspirate
10:33 PM theBear: vs "hangs at `Detecting buspirate...`"
10:33 PM theBear: regardless of what yer add with other options or if yer ask to see the details -v or not
10:34 PM ColdKeyboard: Dammit. This thing is so frustrating
10:35 PM rue_mohr: ColdKeyboard, hmm, maybe someone will come up who has done it
10:35 PM rue_mohr: new wave of people in...
10:35 PM rue_mohr: 7 hours
10:39 PM ColdKeyboard: http://dangerousprototypes.com/forum/viewtopic.php?t=1201
10:41 PM rue_mohr: yea, not a good programmer
10:42 PM ColdKeyboard: :(
10:42 PM ColdKeyboard: Any tutorials on how to use Arduino for this?
10:43 PM rue_mohr: load arduino
10:43 PM theBear: ColdKeyboard, if i was you right now, and i was thinking practically and about finishing rather than what obscure reasons may be going wrong, i'd try a 10k or even losing the reset pullup completely (while connect to a programmer that drives the pin enough to make it program without a pullup in there)
10:43 PM rue_mohr: flash the example "arduino as isp"
10:43 PM rue_mohr: plug into chip, program chip
10:44 PM ColdKeyboard: So do I use the ICSP header on arduino or ?
10:45 PM rue_mohr: I'v not done it
10:45 PM rue_mohr: have an arduino?
10:45 PM theBear: rue is fresher and better 'member'ing than me these days (maybe even other days, he's pretty sharp kinda dude !) but he said 1k often doesn't work, i said less than 10k (and sure 4k7 has been in that cat. in my own stuff/situations more than a couple times) sometimes messes up depending on programmer internal-details and maybe other stuff in circuit, so ya know, only maybe-issue anyone seems to be able to think of
10:45 PM ColdKeyboard: yeap
10:45 PM rue_mohr: have arduino installed on the computer?
10:46 PM rue_mohr: theBear, according to the article he found, its not working for anyone
10:47 PM theBear: rue_mohr, oh, well, that's a bummer, dare i use the term, a deal-breaker, or perhaps show-stopper !
10:48 PM rue_mohr: but he's got an arduino he can turn into an isp programmer
10:49 PM rue_mohr: with that example under examples
10:50 PM theBear: indeed, plus that's not a tech-mystery, i think i'll leave this in your more than capable plaintext hands fer a bit :)
10:57 PM rue_mohr: ok I need to find a computer with sound and watch cartoons
10:59 PM theBear: if yer got any hsp/a2dp capable blue-mouth-bones style whatsits lying around, i find in these new-setup/machine situations, a little usb stub + them works real quick and easy
11:12 PM ColdKeyboard: avrdude -p t85 -P COM5 -c avrisp -b 19200 -v
11:12 PM ColdKeyboard: It now passes but reads all 0s as device signature :\
11:18 PM day__ is now known as day