#avr | Logs for 2016-07-27

Back
[01:45:46] <rue_bed> LeoNerd, you can usually assume that the chip arch wont change with the part number prefix,
[01:46:18] <rue_bed> MICROCHIP is the only company I know that COMPLETELY changed a chip and used the SAME part number, with just a different prefix
[01:47:07] <rue_bed> the 16F877 is NOT AT ALL like the 16F877A
[01:47:12] <rue_bed> postfix, whatever
[01:47:45] <rue_bed> and that was the final straw with microchip, I went to avrs and life was better
[01:48:24] <ewong> didn't Microchip merged/buy out Atmel?
[02:12:47] <rue_bed> yup, I'm packing my bags, I suspect that avr will be killed off soon, arm is next for me
[02:13:00] <rue_bed> buy 'em up!
[02:13:03] <rue_bed> (avrs)
[02:13:58] <rue_bed> its too bad, I really like avrs for small scale controllers
[02:14:06] <rue_bed> arm is stupid overkill
[02:14:28] <rue_bed> I dispise microchip
[02:14:42] <rue_bed> terrible market ethics
[04:01:49] <_ami_> rue_bed: :( SAD! :/
[04:11:56] <_ami_> rue_bed: btw, Realistically Microchip needs to replace its old technology with Atmels?
[04:12:23] <_ami_> i wish atmel mcu architecture will be used even more. :)
[04:30:47] <ewong> well luckily I went with the dragon so. that should last me some time.
[04:32:00] <ewong> beginner here.. I'm was thinking of hooking up an atmega8 chip to a tft lcd 2-line character display.. but I have no idea what's needed. any pointers?
[04:32:30] <ewong> I do have it set up such that atmel studio 7 sees both the dragon and the atmega8 chip
[04:36:25] <theBear> lcdproc website should have the shcem, tho you prlby gotta translate a couple things to even thru a iso transfomrerer
[04:58:16] <antto> i too hope that microchip learns some good habbits from avr, but.. my nose smells the potential reality.. doesn't smell like roses and spring
[04:58:33] <antto> i hope i'm wrong
[05:20:14] <ewong> antto: entropy..
[05:28:53] <antto> microchiptropy
[05:48:57] <twnqx> _ami_: i wish avrs would inherit the dynamic pinning capability of PICs though
[06:31:17] <_ami_> twnqx: yeah, all good things from both parties together --> Awesome product! :
[06:41:05] <LeoNerd> twnqx: That would be nice. I've been on about that many times :)
[06:43:16] <LeoNerd> Hrm.. What sort of thing should I call my 328PB board? Is it a "breakout board"? Or just a "breakout"? Or a "development board"? or...?
[06:43:33] <LeoNerd> I sortof want to avoid the word "board" because that might suggest it's PCB-only, whereas I'm selling the complete thing
[06:43:54] <LeoNerd> But also "breakout" suggests it's a sensor or other sort of peripheral device, rather than actually the core microcontroller for some project
[06:44:01] <LeoNerd> Naming. Naming is hard
[06:47:59] <Lambda_Aurigae> microcontroller adapter thingie
[06:54:33] <Tom_itx> how can i find a list of devices in linux?
[06:54:41] <Lambda_Aurigae> what devices?
[06:54:42] <Tom_itx> specifically hdd s
[06:54:53] <Tom_itx> i don't wanna erase the wrong one :D
[06:55:07] <twnqx> dir /dev/sd* :P
[06:55:14] <Lambda_Aurigae> df will give you a list of mounted devices.
[06:55:56] <Tom_itx> do i address it as sda sdb etc?
[06:56:12] <Lambda_Aurigae> that would be the drives, yes
[06:56:12] <Tom_itx> or the actual name in that list
[06:56:15] <twnqx> those would be your physical devices, yes
[06:56:30] <Tom_itx> so the 2nd device should be sdb?
[06:56:36] <twnqx> likely
[06:56:56] <Lambda_Aurigae> often is
[06:57:27] <Tom_itx> i'll hope so
[06:57:43] <Lambda_Aurigae> the sda1, sda2, sda3, etc will be the partitions on the physical disk.
[06:58:19] <Tom_itx> cat /dev/zero > /dev/sdb will erase it right?
[06:58:35] <Lambda_Aurigae> it will write all zeros to it, yes.
[06:58:42] <Tom_itx> i just need to get rid of grub
[06:58:43] <rain1> lsblk
[06:58:44] <LeoNerd> you probably want to use dd for that
[06:59:14] <Tom_itx> LeoNerd be more specific. i'm not that good at linux
[06:59:14] <twnqx> something like dd if=/dev/zro of=/dev/sdb bs=512 count=1 :P
[06:59:22] <twnqx> zero*
[06:59:29] <LeoNerd> dd if=/dev/zero of=/dev/sdb bs=somenumber count=othernumber
[07:00:39] <rain1> doesn't that just erase the start
[07:00:54] <LeoNerd> That will zero out the MBR, yes
[07:00:59] <LeoNerd> What was the intention?
[07:01:11] <rain1> Tom_itx, make sure you get th e right disk or you'll lose data
[07:01:15] <Lambda_Aurigae> you wanting to erase the whole drive or just the mbr?
[07:01:59] <Tom_itx> just the first few bytes... mbr
[07:02:11] <Lambda_Aurigae> then that's a whole other story.
[07:02:23] <Tom_itx> i just wrote zeros to it and i'll test it later this AM
[07:02:26] <twnqx> it will also clean out the partition table, as you're mostly aware
[07:02:29] <Lambda_Aurigae> easiest way is to make a dos boot drive and use fdisk /mbr
[07:02:40] <Tom_itx> Lambda_Aurigae that didn't work
[07:02:44] <Tom_itx> grub was still there
[07:02:53] <Tom_itx> been there done that :D
[07:02:56] <LeoNerd> Uhm
[07:03:00] <Lambda_Aurigae> http://askubuntu.com/questions/131168/how-do-i-uninstall-grub
[07:03:08] <LeoNerd> If you've killed the MBR and the disk is /still/ bootable, then.. er.. something weird is going on
[07:03:34] <Tom_itx> the issue is that it won't boot windows or dos now. just keep getting grub
[07:03:37] <twnqx> LeoNerd: not necessarily
[07:03:43] <LeoNerd> You definitely did the whole disk (sd?) and not a partition of it (sd?n)?
[07:03:51] <Tom_itx> i need to use the drive for another purpose now
[07:04:02] <twnqx> mightbe a dos/syslinux/whatever first partition loader, and grub being installed into a bootable partition instead of mbr
[07:04:09] <Lambda_Aurigae> http://www.cyberciti.biz/faq/linux-how-to-uninstall-grub/
[07:04:10] <LeoNerd> twnqx: yes but what would boot /that/?
[07:04:11] <twnqx> could also e an EFI system which doesn't care at all about mbr code
[07:04:12] <twnqx> etc
[07:06:02] <Lambda_Aurigae> MBR is not always used these days...
[07:06:09] <LeoNerd> Hrmmm
[07:06:12] <Lambda_Aurigae> ok..time to go to worky.
[07:07:59] <Tom_itx> me too, have a super day :)
[07:12:46] <Tom_itx> http://www.binarytides.com/linux-commands-hardware-info/
[07:13:31] <twnqx> lspci - lsblk - lsusb - lshw....
[07:13:37] <twnqx> without even looking at your list :P
[07:23:39] <_ami_> Tom_itx: fdisk -l
[07:39:50] <skz81> LeoNerd, Tom_itx twnqx DON'T specify count here. Let dd reach the end of the disk. With count=1 you erase only ONE (512B) sector
[07:40:27] <twnqx> do you think the MBR is located anywhere but in the first sector?
[07:41:42] <skz81> Okay, didn't read enough, sorry.
[07:44:20] <skz81> My guess goes to UEFI too, BTW.
[07:45:03] <skz81> also :
[07:45:24] <skz81> tree -C /dev/disk/by-*
[08:05:25] <LOMAS> hello .. tryied reading multiple ADC using interrupt in mega8 reading is okay but while reading ADC0 it gives value of ADC5 and vice versa..
[08:05:39] <LOMAS> I think the proper sequence is missing
[08:05:47] <LeoNerd> Make sure you set ADMUX -before- you start a conversion
[08:05:59] <LOMAS> but I couldn't figure it out
[08:06:12] <LOMAS> LeoNerd, I have taken care of that
[08:06:22] <LOMAS> here is the code http://pastebin.com/SgrLjJt8
[08:06:29] <LOMAS> can you please review it ?
[08:08:15] <LeoNerd> Ugh, possibly; but next time anything other than 'pastebin.com' - it is terrible
[08:09:59] <LOMAS> oh oh.. suggest me the other site.. I will immediately paste more tidy code in there
[08:14:15] <LeoNerd> Hrm.. also I find this quite hard to read.. it's all totally raw bit-twiddling
[08:14:44] <LeoNerd> Please at least use _BV
[08:14:55] <LeoNerd> It helps cut out a little of the constant 1 << noise
[08:16:51] <LOMAS> oh oh .. _BV really eliminates noises ? I didn't know that
[08:17:09] <LeoNerd> I find it easier to read. It's ultimately a personal preference, but most AVR code I tend to find uses it heavily
[08:17:45] <aczid> I second _BV for clarity
[08:17:46] <LeoNerd> E.g. ADCSRA |= _BV(ADEN); vs ADCSRA |= (1 << ADEN);
[08:18:03] <LeoNerd> ADMUX &= ~((1<<REFS0)|(1<<REFS1)); // AREF = External 5V reference <== that I'd call into question also
[08:18:22] <LeoNerd> It's inverted logic
[08:19:39] <LeoNerd> you're turning -off- the REFS0 and REFS1 bits there
[08:20:07] <LeoNerd> I'd probably write that by having a const/enum/whatever containing the ref value I wanted, and doing ADMUX = (ADMUX & ADREF_MASK) | mask;
[08:20:18] <LeoNerd> er. ADMUX & ~ADREF_MASK
[08:20:30] <LeoNerd> Where said mask is a #define or enum or whatever of all the possible mux bits
[08:21:30] <LeoNerd> ADMUX &= ~(1<<ADLAR); // Left Justified Results in Higher ADC register
[08:21:52] <LeoNerd> also incorrect - you turned -off- the Analog-to-Digital Left Align Results flag, meaning they're now right-aligned
[08:24:49] <LOMAS> oh.. thanks, there was error masking ADMUX for reference
[08:25:02] <LOMAS> but Left adjustment is okay for my case
[08:25:18] <LeoNerd> Right; so if you want left-align you want to turn the flag on
[08:25:19] <LeoNerd> |=
[08:25:32] <LOMAS> the ADLAR flag ?
[08:25:32] <LeoNerd> Generally I'd suggest breaking these little bit-twiddling operations into their own nicely-named oneline functions
[08:25:41] <LeoNerd> Yes; it's "Left-Align Results"
[08:25:47] <LeoNerd> Turning it on makes the result left-aligned
[08:26:19] <LeoNerd> Er, "left adjust", even.
[08:27:18] <LOMAS> oh.. okay.
[08:27:28] <LOMAS> just corrected as you said'
[08:27:33] <LOMAS> let me test again
[08:27:45] <LOMAS> I will get back to you immediately :)
[08:28:08] <LeoNerd> .oO( Also you could just steal my set of adc.[ch] files and extend as appropriate ;) )
[08:30:10] <LOMAS> LeoNerd, that would be great to me .. where can I find it ?
[08:30:38] <LOMAS> I just made ADLA 1 but the result from a channel was "30208"
[08:35:45] <LOMAS> LeoNerd, you there ?
[08:36:44] <LeoNerd> Hi
[08:37:47] <LeoNerd> That sounds plausible for a left-aligned result
[08:38:29] <LeoNerd> 30208/64 = 472
[08:39:03] <LeoNerd> So the ADC mux input is at 472/1024 of the ref
[08:39:04] <LOMAS> that's the result for channel 5
[08:39:16] <LOMAS> but it is being read at channel 0
[08:39:44] <LOMAS> and channel 0's result is being read at channel 5
[08:39:59] <LOMAS> yeah.. there is error in MUXING
[08:40:22] <LeoNerd> You might need to let the S&H cap settle between switching
[08:40:26] <LeoNerd> .. oops
[08:40:54] <LeoNerd> You might need to let the S&H cap settle between switching [repost]
[08:41:00] <LOMAS> LeoNerd, I'm back.. was problem in connection
[08:42:38] <LOMAS> mean ?
[08:42:41] <LOMAS> S&H ?
[08:43:34] <LeoNerd> "sample and hold"
[08:44:16] <LOMAS> oh oh...
[08:44:19] <LeoNerd> I tend to find after switching the ref or mux selection that the next conversion is silly. take one and throw it away, then use next result
[08:45:03] <LOMAS> you mean ignoring the first result and reading from next ?
[08:45:08] <LeoNerd> Yes
[08:45:33] <LOMAS> oh oh ..okay let me test ...
[08:49:57] <LOMAS> okay.. I am going to read all of them in round and robin fashion..
[08:50:01] <LOMAS> all of them
[08:55:46] <LeoNerd> Hmmm; rumour has AD are buying LT
[08:56:21] <LeoNerd> About time they merged... might reduce the candidates for searching for parts down a bit :)
[08:57:45] <LOMAS> LeoNerd, didn't get what you said. Sorry I'm not a native english speaker.
[08:59:01] <LeoNerd> Analog Devices are buying Linear Technology
[09:00:43] <LOMAS> LeoNerd, oh oh .. buying and selling is more common now a days. Atmel by microchip, ARM by japnese company .. :D
[09:01:36] <Tom_itx> fwiw, i got it working...
[09:01:40] <Tom_itx> thanks to all
[09:05:34] <LeoNerd> Yeah, there's a lot of acquisitions going round lately
[09:11:06] <bss36504> I would have preferred LT stayed on it's own. I kind of like them, they seem like the "Mom n Pop store" of semiconductor companies. They provide a premium product at a premium price, but you also can't beat the feeling of intimacy you get from shopping there. With all of 3700 employees worldwide (most of which I would speculate are manufacturing),
[09:11:06] <bss36504> they're really small
[09:31:31] <R0b0t1`> Didn't know that. Usually I only get intimacy while shopping for escorts.
[09:31:48] <R0b0t1`> Does explain why their customer service is better than most.
[10:23:46] <bss36504> Well you can afford good service when you sell $300 DACs
[11:00:55] <LeoNerd> Huh. How annoying. An ATmega digital IO pin typically requires at least 70% of VCC to guarantee it reads a HIGH state
[11:00:59] <LeoNerd> 70% of 5V is 3.5V
[11:01:17] <LeoNerd> Meeeeaning, a chip powered at 5V cannot -quite- be guaranteed to read a 3.3V chip properly. :(
[11:01:35] <LeoNerd> I'm going to have to get the level shifter out :(
[11:01:53] <twnqx> bah
[11:02:02] <twnqx> just add a slight pull-up resistor
[11:02:06] <LeoNerd> HAh
[11:02:20] <LeoNerd> .. that's almost sensible
[11:02:46] <twnqx> just make sure you don't exceed the sender's clamp diodes :P
[11:03:02] <twnqx> (and that is had any)
[11:03:21] <LeoNerd> The sender is my buspirate
[11:03:31] <LeoNerd> Oh;... I could set the BP into opendrain mode and use its own pullups
[11:04:04] <theBear> meh, exceed the hell outta them, if yer wires start smoking, or the area you guess the clamps live in your micro i spose, use thinner wires or add a series resitor :)
[11:04:31] <LeoNerd> WellI don't want to pop the BP, I only have one :P
[11:13:13] <LeoNerd> Hrm. I suppose I -cooould- just run the board at 3.3V instead
[11:15:05] <LeoNerd> Ah helpfully, my RS-485 isolator can cope at 3.3V
[11:15:22] <rain1> would you recommend kicad on linux to draw a circuit diagram including an AVR chip?
[11:15:24] <LeoNerd> Weird, I wonder how this has been working on the breadboard
[11:15:33] <LeoNerd> rain1: I use nothing else ;)
[11:15:40] <rain1> ok great!
[11:15:40] <LeoNerd> (Yes; KiCad is nice)
[11:15:54] <theBear> guaranteed specs can be exceeded, just like values can be closer than tolerance
[11:16:12] <LeoNerd> Mmm true
[11:16:18] <LeoNerd> Maybe I just got lucky with that chip
[11:16:20] <LeoNerd> It is a different chip
[11:22:22] <rain1> ive got a question about this
[11:22:26] <rain1> http://i.imgur.com/xGVK2fk.png
[11:22:38] <rain1> the pins are all at one side, it's not the same as the real chip
[11:22:50] <rain1> is there a way to make it more like the real thing?
[11:22:53] <LeoNerd> No
[11:22:55] <LeoNerd> and that doesn't matter
[11:23:13] <LeoNerd> Generally schematic diagrams are laid out logically, grouping similar pins together, regardless of physical layout
[11:23:43] <LeoNerd> It's typical of AVR chips for all the regular port pins to be on the right side, and PSU/special analog/etc... on the left
[11:23:48] <LeoNerd> reset,.. dedicated xtal,...
[11:24:10] <rain1> it's just a bit confusing
[11:24:44] <LeoNerd> It's a sensible layout. E.g. notice that they've got all of PB0 to 7, in order; then all of PC, then PD. Neatly ordered
[11:45:11] <theBear> if any of this refers even a little to *duino things, they are INSANE pinouts, sure, SOME things are in logical/port/bit order and arrangements, some of them even matching the bare ic, but then they rename AND rearrange physically other pins/ports, to the extent of breaking hw ports and recombining them "wrong" to make virtual/ports as marked and exposed, which if you listened to anyone in the know abuse arduino port i/o wrappey lib/functions, you are
[11:45:11] <theBear> already thinking "explains a lot"
[13:47:47] <Emil> Has anyone managed to sample dem crypto chips from atmel?
[15:28:28] <Tom_itx> Emil i'm not sure that's possible
[15:28:50] <Emil> Tom_itx: elaborate?
[15:29:12] <Tom_itx> not sure but possibly due to the encryption technology
[15:29:29] <Emil> wat
[18:18:08] <cehteh> mhm are there small onewire EEPROM or flash chips, preferably in to92 with extended temperature range (max 120°C)
[18:18:24] <cehteh> time for googeling
[18:19:27] <LeoNerd> onewire eeprom could be amusing
[18:19:45] <LeoNerd> "The DS2431 is a 1024-bit, 1-Wire® EEPROM chip organized as four memory pages of 256 bits each." says google
[18:19:58] <cehteh> the trick is the 120°C
[18:20:12] <cehteh> maybe bit less but normal 85°C wont do it
[18:20:38] <LeoNerd> ahh
[18:20:39] <cehteh> or maybe mariginally ..
[18:21:08] <cehteh> but i think its not a good idea to go to the temperature marigin
[18:22:03] <cehteh> well maybe i just try to move them away from the heater
[18:22:30] <cehteh> attach them to the connector or something like that
[18:22:50] <LeoNerd> It's onewire, so there's not much copper to link them :)
[18:24:06] <cehteh> https://www.maximintegrated.com/en/products/digital/memory-products/DS2431-A1.html
[18:24:11] <cehteh> gotcha
[18:24:56] <cehteh> yes but i like to build it solid with only 3 wires coming from a big epoxy mold
[18:26:54] <cehteh> http://www.reichelt.de/index.html?&ACTION=446&LA=0
[18:27:18] <cehteh> waah .. 4kbit is available in to92, 1kbit is not :D
[18:27:55] <cehteh> damn reichelt lkinks dont work
[18:28:02] <cehteh> i always forget that
[18:30:47] <cehteh> also in other, i need a 100µH inductor for 20A .. seems to be hard to come by in small quanities too, and no i dont want to wind them by myself
[18:34:35] <cehteh> https://www.amazon.de/DS2431X-S-Maxim-Integrated-pcs-pack/dp/B017TIQGLC oh yeah
[19:00:47] <ayjay> is anyone here familiar with using atmel studio with an explained mini device?... and any software you could use to load an explained mini device from linux?
[19:06:22] <ayjay> i guess it uses omething called meDBG?
[19:07:14] <Lambda_Aurigae> is that like debugWire?
[19:08:24] <ayjay> i guess... i'm not positive, i'm doing some research now
[19:08:41] <ayjay> both are USB based uploaders?
[19:09:12] <Lambda_Aurigae> well, no.
[19:09:19] <Lambda_Aurigae> debugWire isn't a usb bootloader.
[19:09:27] <Lambda_Aurigae> it's a hardware debugging interface on some AVR chips.
[19:10:10] <ayjay> hmm i think debugWire is a step up from meDBG
[19:10:20] <ayjay> I did find this though: https://github.com/ataradov/edbg
[19:10:36] <ayjay> it says its for ARM devices but hex is hex and i thin the medbg protocol is probably the same
[19:14:28] <cehteh> hex is hex? lol
[19:16:01] <Lambda_Aurigae> 0xFU ?
[19:21:43] <cehteh> what package is sfn-2?
[19:22:04] <ayjay> cehteh: I mean you don't use the meDBG to compile anyway
[19:22:55] <cehteh> https://www.conrad.de/medias/global/ce/7000_7999/7500/7530/7538/1121874_BB_00_FB.EPS.jpg << whah looks like serious onewire packaging
[19:23:29] <cehteh> https://www.maximintegrated.com/en/products/digital/one-wire/1-wire-contact.html
[19:23:48] <cehteh> pins? yes, 2
[19:30:03] <Chillum> slick
[19:30:09] <Chillum> parasitic power I assume
[19:38:47] <cehteh> yes
[19:39:37] <cehteh> and damn .. how can one google for a inductor 100µH 20A .. google returns all kinds of shit 2.0A 0.20A .. etc
[19:40:03] <cehteh> http://www.mercateo.com/p/2805-DTMSS(2d)40(2f)0(2e)1(2f)20(2d)V/Drossel_Draht_100uH_20A_10_7m_THT.html
[19:40:08] <cehteh> mhm *blink*
[19:40:26] <cehteh> doh .. 100pcs
[19:40:46] <Chillum> ohh it is meant to be electromechanically mounted
[19:40:56] <Chillum> like slide in
[19:41:17] <cehteh> ah i am already at diffferent things, thats not interesting for me
[19:41:45] <cehteh> i have a 5v power line anyway and need to connect that on a bus with a ds18b20
[19:48:51] <Chillum> I just requested a free sample