#avr Logs

Jan 08 2018

#avr Calendar

12:49 AM sabor_ is now known as sabor
02:13 AM rue_mohr: ! it worked...
02:15 AM rue_mohr: http://paste.debian.net/1003960/
05:07 AM rue_bed: oooo I think I can use a crafty rollover trick
05:38 AM rue_bed: I did it, I reduced it from a 3 nest loop to a 2 nest
05:38 AM rue_bed: must test more
05:42 AM rue_bed: ooh yea, its checking out
06:38 AM osfe: Hi there, can you please tell me about a document to help me make up my mind about alias vs scripts
08:19 AM skz81: osfe, for short, the main difference is : with aliases you CAN'T play with provided arguments
08:19 AM skz81: https://unix.stackexchange.com/questions/30925/in-bash-when-to-alias-when-to-script-and-when-to-write-a-function
08:48 AM osfe: skz81: obviously I did not write in the right place but thank you anyway :)
08:57 AM _ami_: woah! 18GB of bloatware to download. #fpga misery :/ http://dl.altera.com/?edition=standard
08:58 AM _ami_: i think lite edition may work for cyclone 4 board which i have.. but still its size is 6gb.. will take a while to download.. :/
09:01 AM Casper: _ami_: simmilar to that 1.4G download just to get a 10MB .exe file .... because microsoft did not made it available separatelly
09:02 AM _ami_: :(
09:03 AM _ami_: i am trying to setup on arch linux. lets see how it goes.
09:10 AM _ami_: all the AUR pkgs on Arch for quartus is retired :/ so i have to download/setup it manually.
09:10 AM _ami_: https://aur.archlinux.org/packages/?O=0&SeB=nd&K=quartus&outdated=&SB=n&SO=a&PP=50&do_Search=Go
09:10 AM rue_: _ami_, I got hung up on the 64 bit thing, I run my machines @ 32 bit
09:11 AM _ami_: rue_: oh, thats the bad news.
09:11 AM _ami_: i think it would work if i have multilib installed .
09:13 AM skz81: _ami_ you should be able to start with an old PKGBUILD and few tweaking, if you have one handy... Better than doing everything by yourself I guess
09:14 AM _ami_: skz81: thats a good suggestion. let me try that.
09:14 AM soul-bw is now known as soul-d
09:18 AM _ami_: ls
09:35 AM skz81: bin dev home lib var ^^
09:43 AM _ami_: :)
10:19 AM eszett: hi
10:20 AM eszett: little question. I've got a PCB with atmega32u4 circuit, which is silent when I plug it in, that's odd. So I'm trying to debug it with the multimeter, but how do I proceed?
10:20 AM eszett: I measured that there is the proper voltage of 5,12 V in the circuit
10:20 AM eszett: but for some unknown reasons the circuit isn't recognized as HID device in windows
10:22 AM eszett: I would expect a windows messages like "new device detected"
10:24 AM skz81: eszett, you should see its VID:PID in peripherals manager, if recognized as USB
10:25 AM Thrashbarg: and if there's any code on it to begin with
10:28 AM eszett: the microcontroller is empty, that's what I know
10:28 AM eszett: ok, I open the device manager
10:28 AM Thrashbarg: heh
11:13 AM antto: how would it appear as a USB device at all if there's no code in it?
11:58 AM Ameisen: hmm
11:58 AM Ameisen: this new heater doesn't have a plug on it
11:58 AM soul-d: antto, i think he means one of the usb version with self progamble option like you just wire a button to pin to start the usb bootflasher
11:59 AM antto: a USB-aware bootloader?
11:59 AM soul-d: yeh those a re old i made one 5 years ago with atmege 8 u2 or 4
12:00 PM soul-d: donno what the name was but it was 8bit variant
12:02 PM soul-d: so you don't need a programer with them and can use avrdude directly with it
12:02 PM soul-d: but it only works if you pull correct pin to gnd
12:03 PM soul-d: or high donno one of the 2 :P
12:56 PM Apocx_ is now known as Apocx
01:11 PM mudkip908_ is now known as mudkip908
01:26 PM Tom_itx is now known as Tom_L
01:59 PM Emil__ is now known as Emil_
03:21 PM nuxil: hmm. im reading the datasheet for my mcp4131 spi potmeter. it says its resistor network resolution is for 7-bit: 129 steps, 8-bit:257 steps, is this a typo in the datasheet ? http://ww1.microchip.com/downloads/en/DeviceDoc/22060b.pdf page 1
03:22 PM nuxil: are the pins floating when the chip startup and this +1 step is just a onetime event that can be done ?
03:22 PM nuxil: anyone messed with spi pots before ?
03:24 PM nuxil: looking at page 2 look so but. im not sure.
03:28 PM Aslak3: It's possible the extra "step" is referring to the shutdown state?
03:28 PM Aslak3: Or... Page 37
03:28 PM Aslak3: For a 7-bit device, there are 128 resistors in a string between terminal A and terminal B. The wiper can be set to tap onto any of these 128 resistors thus providing 129 possible settings (including terminal A and terminal B).
03:29 PM Aslak3: doesnt really explain it though
03:31 PM nuxil: i mean. 0b1111111 == 127. 0 til 127 = 128 steps. so how you suppose to get 129 number from a 7 bit.
03:31 PM nuxil: i dont get it :p
03:32 PM Aslak3: the other state is when its shutdown?
03:32 PM nuxil: i was thinking that maybe CS (chip select) putted the output in a tristate but on page 2 it seems to only be related to the spi.
03:34 PM nuxil: i must experiment. :p
03:34 PM nuxil: im thiking that the chip has floating pins when starting up.
03:35 PM Aslak3: try it out, like you say
03:35 PM nuxil: will do.
03:45 PM nohit_: that's the a to b
03:47 PM polprog: poor mans adc ;p
03:47 PM polprog: dac*
03:47 PM polprog: ?
03:48 PM nohit_: i think its very unclearly put, and "settings" refers to different resistances
03:57 PM nohit_: nm
03:58 PM eszett: to my misery I have inet disconnects
04:00 PM nohit_: 0 - 128
04:01 PM nuxil: thats 8 bit
04:02 PM nohit_: 128 resistors, so 129 steps. if you look at the picture at page 37
04:02 PM nohit_: first step is before any resistors, and the 129th step is after the 128th resistor
04:05 PM nohit_: if you look at the pictures and ignore everything else, there's 4 resistors but 5 steps
04:05 PM nohit_: *picture
04:05 PM nohit_: at 37
04:10 PM nohit_: do you get it now?
04:16 PM nohit_: i quess its stupid to call it 7-bit as you will need 8-bit value (0x80) to reach the full scale
04:17 PM nuxil: yes.
04:58 PM eszett: my inet connection seems to be stable now?
04:59 PM eszett: trashbarg?
05:06 PM polprog: are you using a bouncer/irc box?
05:07 PM eszett: no
05:07 PM eszett: do you think I better should?
05:15 PM Emil: yes
05:15 PM Emil: Everyone should
05:17 PM eszett: I'm just a private user without server hardware
05:18 PM Emil: VPS is your friend
05:18 PM Emil: I irc from a VPS
05:25 PM eszett: maybe that would be an option..
05:26 PM enh: Emil?
05:27 PM enh: Heard any news from Lambda_Aurigae?
05:28 PM Emil: enh: because always available and convenient
05:28 PM Emil: and sadly no :/
05:29 PM eszett: hm
05:29 PM Emil: Good night
05:29 PM eszett: night
05:42 PM eszett: I've succeeded talking with a buspirate to my Atmega32u4 circuit.. however, when I'm trying to set the fuses it fails. Lock bit is unset, so it must be something else. I suspected the problem beeing the Baud rate, but I set it down to "-B 1" with avrdude, so It doesn't seem to solve the prob
05:55 PM nuxil: use -b to set the speed.
05:55 PM nuxil: example -b 9600
05:56 PM eszett: ok
05:56 PM enh: -B 1 increases speed. try -B 500 also.
05:57 PM enh: -b and -B are different
05:57 PM enh: both change speed
05:57 PM enh: in different ways
05:57 PM eszett: is it lowercase letter "b" or uppercase?
05:57 PM enh: -b is for baud rate
05:58 PM nuxil: -b and -B is not same
05:58 PM enh: -B is for something else. -B1 is the fastest transfer
05:58 PM nuxil: -B <bitclock> Specify JTAG/STK500v2 bit clock period (us).
05:58 PM enh: I use it on ATMEL ICE
05:58 PM enh: true
05:59 PM enh: I use -B 1 on ICE to program faster
05:59 PM eszett: I've used the avrdude "-b 600" now, which is the same value "600" as I set here in the virtual serial COM port of my buspirate: https://i.imgur.com/EXpfh8l.png
05:59 PM nuxil: dont use 600
06:00 PM enh: 9600 should work
06:00 PM eszett: alright, 9600 now
06:02 PM eszett: gotta reboot
06:02 PM nuxil: and even 9600 is slow :p
06:04 PM nuxil: i use 9600, 14400 for my home made programmers. works fine. dont want to push em to hard: p
06:07 PM eszett: re. With "-b 9600" the bus pirate doesnt respond anymore: https://i.imgur.com/pnPnF4z.png
06:07 PM nuxil: heh. idk.
06:08 PM nuxil: baud rates: 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600
06:08 PM nuxil: try next one :p
06:08 PM eszett: yep I going through all of them
06:08 PM nuxil: ^^
06:09 PM eszett: what I need to know: do I have to change the baudrate value of the virtual COM port (which belong to my buspirate hardware) in the device manager too?
06:10 PM nuxil: oh. you might
06:11 PM eszett: ye... doin that.
06:13 PM nuxil: this is why i dont like cheep chinees hw for like $5 buck. only problems with them. :p
06:17 PM nuxil: when i started doing avr i read bad stuff about cheep chinees copies of stuff. so i made my own programmer. then expaned it to a raspberry pi :p
06:18 PM nuxil: so i have a programmer that has wifi, ssh/smb all the dev tools needed.. nice little handy portable progammer: p
06:18 PM eszett: I've tried it with a cheap china USBasp, but then changed over to buspirate which is a quality programmer
06:18 PM nuxil: it looks like shit tho. but it does its job. https://gyazo.com/fd5bbb22d18a7922a5a582646c0c6275
06:19 PM nuxil: no luck in setting com port speed either ?
06:20 PM nuxil: do you have linux ?
06:20 PM nuxil: i see you use windows. but do you have linux you can try on ?
06:22 PM nuxil: sometimes usb stuff can be a bit fucked up on windows. like stuff refuse to work on one port. plug it in next and it suddenly works.
06:24 PM eszett: yes I once used linux on a VM in my windows to do the avrdude stuff, maybe I should do that again
08:45 PM eszett_: It seems that I found the source of trouble now
08:45 PM eszett_: I added "-e" to the avrdude command line, and now it doesn't fail to change the fuses anymore
08:46 PM eszett_: and -e clears the lock bits. but.. if the lock bits were the problem why doesn't say avrdude explicitely so?
08:46 PM eszett_: that's weird. avrdude just said "verification error; content mismatch" and "failed"
08:47 PM eszett_: can this error message refer to locked lock bits?
08:52 PM Casper: I beleive it is due to how the avr report the error
08:52 PM Casper: I think it do not error out, but just read "empty"
08:53 PM eszett_: ok..
08:54 PM eszett_: I was happy for a second that I succeeded writing the fuse bits, now I realized that I deactivated the JTAGen fuse bit... lol
08:54 PM eszett_: And the whole circuit is soldered.. great
08:55 PM eszett_: AFAIK I have to desolder the ATmega, throw it away, and solder a new one in
09:03 PM eszett_: btw.. why is this CKDIV8 fusebit enabled by default? do people in general want their clock speed divided by 8?
09:03 PM eszett_: is there some reason behind this crazy?
09:04 PM rue_: its prolly more stable
09:04 PM nuxil: it runs 1mhz stock. 8mhz internal rc.
09:04 PM nuxil: i see no problems with that setting :)
09:04 PM eszett_: I put a 16mhz crystal on it, coz id like to have it 16mhz =)
09:04 PM nuxil: just change the fuse if you want it to run on crystal.
09:05 PM eszett_: ye did that.. plus I accidentally changed the JTAGen fusebit too :-(
11:19 PM day__ is now known as day