#avr | Logs for 2016-10-28

Back
[01:24:46] <rue_house> huh
[01:25:11] <rue_house> I wonder if a webpage can get a browser to tell it the hosts telephones email/phone number
[03:11:07] <ScrumpyJack> o/
[03:11:16] <_ami_> \o
[03:11:51] <ScrumpyJack> morning _ami_ thank for the channel tip
[03:12:27] <_ami_> np
[05:13:00] <ScrumpyJack> so i'd like to program an arduino micro (atmel 34U4)
[05:13:15] <ScrumpyJack> with avrdude.
[05:14:54] <ScrumpyJack> the 32U4 can act as SPI programmer for another avr right? but can i program the 32U4 directly?
[05:16:52] <GeneralStupid> ScrumpyJack: every controller with enough GPIO can act as a SPI programmer...
[05:18:10] <ScrumpyJack> sure, but all i have here is the 32U4 on arduino micro
[05:24:00] <GeneralStupid> ScrumpyJack: and of course you can. i know it has a JTAG connector. Maybe it can do PDI
[05:29:11] <ScrumpyJack> sorry, i'm probably not be very clear. I'm not trying to use the arduino micro as an AVR ISP programmer to program aonther AVR
[05:29:42] <ScrumpyJack> I'm trying to program the atmega32U4 on the arduino micro :)
[05:29:54] <lochs> ScrumpyJack: if it comes with a bootloader i'm quite sure you can just program it through usb
[05:30:12] <lochs> otherwise you'll need a programmer
[05:32:59] <GeneralStupid> i understand that but normally you need a programmer to program a microcontroller...
[05:33:32] <GeneralStupid> If arduino has a bootloader then you dont need one. But i dont know arduino
[05:37:22] <lochs> at least if it's "arduino" i'm sure it has a bootloader in-place that talks usb
[05:38:01] <lochs> and then it can perform self-programming
[05:40:09] <GeneralStupid> so what was the question? -.-
[05:40:41] <GeneralStupid> he wanted to know if he can program it directly... The answer is: yes. :)
[05:41:02] <carabia> what's up people
[05:46:20] <_ami_> carabia: yo
[05:46:23] <_ami_> howz going
[05:48:54] <carabia> going pretty good as a matter of fact!
[05:49:07] <carabia> how's it hanging _ami_?
[05:56:51] <_ami_> waiting for office time to get over! a verrrrrryyy llllooooonnnnnngggggg weekend ahead! ;)
[06:01:58] <carabia> oh great, that means more avr-time
[06:20:20] <_ami_> carabia: :)
[06:22:28] <Lambda_Aurigae> ScrumpyJack, yes, if the arduino still has the arduino bootloader on it, you can use avrdude to upload a program to it through that bootloader.
[06:24:50] <ScrumpyJack> neat. so the usb MCU can't be used as a progammer then right?
[06:26:27] <Tom_L> not familiar with that U4 but if you can load lufa on it you can
[06:53:00] <Lambda_Aurigae> ScrumpyJack, probably.
[06:53:13] <Lambda_Aurigae> if you have the right program to turn that ardweeny into a programmer.
[06:53:49] <Lambda_Aurigae> that being said, I don't do arduino so never used avrdude to program one nor have I used an arduino as a programmer...but I have seen such on the web and discussed in here before.
[07:04:38] <ScrumpyJack> i'll poke around a bit more before being too noisy here
[07:06:18] <GeneralStupid> do i have to configure the ASF Clock Manager to use the ASF SPI driver? -.-
[07:11:54] <Lambda_Aurigae> people really use ASF?
[07:24:57] <GeneralStupid> people really recommen the use of asf...
[07:28:20] <Lambda_Aurigae> "people" recommend upgrading to windows 10 too...
[07:28:28] <Lambda_Aurigae> anyhoo, I'm off to work.
[07:29:03] <GeneralStupid> Lambda_Aurigae: i wanted to use LUFA for USB
[07:29:33] <GeneralStupid> Lambda_Aurigae: but the main developer recommended asf on XMEGA devices...
[07:29:59] <GeneralStupid> And thats where it started. My 8 bit microcontroller code is so complex that i dont understand it completely
[07:52:12] <carabia> GeneralStupid: probably justified for xmegas. not so much for tiny/mega
[07:53:14] <carabia> GeneralStupid: even then you can peel away the abstractions using asf as a guideline and write your own
[07:56:41] <carabia> then again who the hell recommends xmegas in the first place :D
[07:59:13] <GeneralStupid> carabia: i dont made the pcb ...
[07:59:53] <GeneralStupid> carabia: i already realizes how much easier everything would be with an avr32
[08:01:41] <GeneralStupid> in this project, xmega leads to asf, asf leads to atmel studio and that leads to development on windows...
[08:14:10] <DKordic> GeneralStupid: [[http://opensource.apple.com/source/Libc/Libc-997.1.1/gen/FreeBSD/fmtmsg.c?txt][DO NOT INTEGRATE THIS CHANGE]] :)
[08:24:15] <GeneralStupid> I just hope that it works stable -.-
[08:29:12] <jben> Hi (again)
[08:29:54] <jben> I need to have devices (build with a xmega 256a3u) on a rs485 bus
[08:30:33] <LeoNerd> So use one of the many many (maaaaaany) RS-485 chips
[08:30:37] * LeoNerd even sells some on boards ;)
[08:30:52] <jben> I need each device to have a Unique id, but I don't want to use DIP switch on the board or different program
[08:30:59] <LeoNerd> EEPROM
[08:31:11] <jben> LeoNerd: for the physical layer yes, I use a max3483 ;-)
[08:31:21] * LeoNerd likes the MAX14853
[08:31:36] <jben> LeoNerd: Yes EEPROM is a choice, but I had some problem with it
[08:31:44] <LeoNerd> All-in-one RS-485 + logic isolator + power driver. Just add a pulse transformer and it's fully galvanically-isolated
[08:32:13] <LeoNerd> I don't know the XMEGA chips, but I know on ATtiny/ATmega there's a fuse you can set that tells it not to erase the EEPROM on normal chip erase before a reflash
[08:32:22] <LeoNerd> So you can preserve things like per-chip IDs in there
[08:32:26] <jben> with power supply failure and reboot, sometime the EEPROM go to 0x00, I don't understand why
[08:32:36] <LeoNerd> Ah, that sounds awkward
[08:32:53] <LeoNerd> How many IDs do you need in your application?
[08:33:01] <jben> ~ 32
[08:33:02] <LeoNerd> If not true DIP switches, maybe just solder bridges on the board?
[08:33:11] <LeoNerd> Hrm.. 32 is probably a bit too many to use an analog read
[08:33:26] <jben> LeoNerd: no, by board is made now, and I don't want to modify it
[08:33:28] <LeoNerd> I've seen I²C chips that manage to squeeze 8 addresses on a single analog input line
[08:33:30] <LeoNerd> ah
[08:33:49] <jben> when I made the oard I was thinking using the EEPROM
[08:34:22] <jben> and this year, the first use (I use only this board 2 week per year)
[08:35:42] <jben> I am thinking of using the production row to have a unique ID, in particular LOTNUM{1,2,3,4,5}, WAFNUM, COORDX{0,1}, COORDY{0,1}
[08:37:01] <jben> folowing the datasheet, http://www.atmel.com/Images/Atmel-8331-8-and-16-bit-AVR-Microcontroller-XMEGA-AU_Manual.pdf, all this byte can be used as a serial number
[08:37:19] <jben> but 10 bytes for a id, it is LONG
[08:58:29] <jben> To be precise, when I made my board, I made a extension slot, (power, and all the pin of the mega I do not use) for possible future use
[08:59:11] <jben> I could use this slot, with a mini-board with dip switch, but in my mind it is the last solution
[09:01:32] <jben> If I use the 10 bytes with a checksum function to reduce the ID to 4 bytes id, with 32 devices, my probability of ID collision is < 2e-7
[09:02:55] <jben> 1 - 1×(1-1/N)×(1-2/N)×…×(1-31/N)
[09:03:19] <jben> (with N the cardinal of my id space, with 4 bytes id N=2^32)
[09:05:23] <jben> Does using the serial number (lot+wafer+coords) with a checksum to have 4 bytes id seem to be a good idea for you?
[10:26:30] <hetii> Hello :)
[10:28:22] <bss36504> Hello
[10:34:25] <hetii> I try execute some atmel examples for at91sam7s uC, but none of them works on my board. I have also some original firmware for that board and it works.
[10:34:53] <hetii> Any clue how I can investigate whats the different could be
[10:35:25] <bss36504> "none of them work"...does that mean they dont compile or just dont function properly?
[10:37:25] <hetii> I`m able to compile them and flash but my led is all the time off and (were should blink) and in another example I try use some USB functionality, but its not enumerate
[10:37:54] <hetii> only with original firmare USB is recognized as ttyACM0
[10:38:43] <bss36504> Start with the LED. Comment out all the USB nonsense. Figure out why the LED isnt working. Is it a board configuration file youre missing? Narrow the problems down and work through them one by one. Maybe you'll get lucky and when you fix the LED the USB will work too.
[11:38:33] <hetii> bss36504, as output file for those example I have getting-started-project-at91sam7s-ek-at91sam7s64-flash.bin getting-started-project-at91sam7s-ek-at91sam7s64-sram.bin and elf files
[11:38:51] <hetii> should I flash and sram or just flash is enough ?
[11:56:12] <bss36504> just flash is enough
[12:27:00] <hetii> hmm
[12:27:05] <hetii> still without success :/
[12:33:00] <cehteh> you prolly doing something fundamental wrong .. how is the chip clocked, how is it powered?