#avr | Logs for 2015-07-23

Back
[04:32:14] <day> im trying to understand how to dump the internal flash of microcontrollers. but i cant find anything about it. everyone just seems to be able to do it. Is it a standardized process? is it part of the technical manual?
[04:32:24] <day> and controller specific?
[06:30:36] <LeoNerd> day: It's usually an operation you do over ISP or HVPP/HVSP.. depending on the chip
[06:30:45] <LeoNerd> Or JTAG. Or PDI. Or ...
[06:30:48] <LeoNerd> What chip do you have?
[06:35:43] <Haohmaru> so avrdude 6.1 can read .elf files and flash fuses and everything.. how nice
[06:36:03] <Haohmaru> if i understand correctly
[06:36:47] <LeoNerd> Yup
[06:38:21] <Haohmaru> \o/
[06:39:52] <specing> too bad it can't make me a sandwitch
[06:40:09] <martinus> use sudo
[06:40:40] <specing> still nothing
[06:42:13] <martinus> Damn, XKCD said that this is how one gets a sandwich. The internet has lied to me, again.
[07:19:33] <day> LeoNerd: i dont have a specific chip in mind. but we could assume a atmega8 e.g.
[07:19:51] <LeoNerd> Well, then an ATmega8 will respond to ISP or HVPP
[07:20:08] <day> well sure. i understand the protocol/interface itself
[07:20:19] <day> but why is the flash readable through spi e.g.
[07:20:33] <LeoNerd> Why not? It's a useful thing for ISP to support
[07:20:34] <LeoNerd> So it supports it
[07:20:35] <day> and how do i figure out how do access it? (part of the manual?)
[07:21:11] <day> LeoNerd: so the lockbits simply disable the reading/writing via spi etc.?
[07:21:30] <LeoNerd> Over any protocol
[07:21:44] <day> yes
[07:22:04] <day> and where are the commands specified?
[07:22:15] <LeoNerd> "the commands"?
[07:22:35] <LeoNerd> At what level? The ISP stuff is documented in "Memory Programming" in the chip's datasheet
[07:22:38] <day> well if you want to read byte 0xXX of your flash memory
[07:22:47] <day> oh. ive never seen that chapter
[07:22:56] <LeoNerd> Wellthen :)
[07:23:41] <day> but its a chip specific thing, right? theres no/very little standardization going on, correct?
[07:23:51] <LeoNerd> Prettymuch all the chips work the same
[07:24:13] <LeoNerd> There's a lot of duplication among the AVR datasheets.. they're not very good at de-duping
[07:24:30] <day> ah i was thinking outside of atmel.
[07:24:31] <LeoNerd> E.g. many of the ATmega chips have *the same* SPI module inside, and yet there's ~20 pages dedicated to that
[07:24:39] <LeoNerd> in every single chip DS
[07:25:16] <day> yes within the same company its obviously the same/very similar
[07:25:19] <LeoNerd> Whereas Atmel could publish a set of documents saying "this is an SPI module, this is a UART, this is an 8bit timer without ICR", etc etc.., and then just say for each chip, which hardware modules are present at what register addresse
[07:25:22] <day> it would be crazy if not :D
[07:25:35] <LeoNerd> It would certainly make *my* life easier ;)
[07:25:43] <Lambda_Aurigae> that's how microchip does for pic chips.
[07:25:56] <day> hm. i think the way they do it now is better for beginners
[07:26:00] <day> you get one document
[07:26:01] <LeoNerd> Yah - well, they have looooads more chips than Atmel
[07:26:58] <day> im pretty sure atmel does it the same way internally
[07:29:51] <Lambda_Aurigae> I find atmel docs much nicer than microchip overall though.
[07:31:02] <day> microchip is a giant mysterium to me.
[07:35:15] <Lambda_Aurigae> they make some good stuff.
[07:35:18] <Lambda_Aurigae> and they make some crap.
[07:35:22] <Lambda_Aurigae> I like the pic32 chips.
[07:35:34] <Lambda_Aurigae> and the enc28j60 ethernet to spi chip.
[07:35:37] <Lambda_Aurigae> anyhow,,,gotta go to work.
[07:35:38] <Lambda_Aurigae> laters.
[11:10:30] <aandrew> Lambda_Aurigae: yep and I hate the micro
[11:11:17] <aandrew> Microchip data sheets. Little sprinkles of info here and there spread across 8 data sheets with exceptions in three others
[11:11:27] <aandrew> TI does the same thing
[11:17:12] <gjm> 17
[11:33:24] <aep> can an atmega328 tolerate 5V TTL when running at 3.3V or lower?
[11:39:13] <LeoNerd> ooh.. an excitingly-fun question
[11:40:07] <aandrew> aep: the data sheet should tell you
[11:40:29] <aandrew> aep: iirc no, but with an external diode or resistor at the least it should be ok
[11:43:59] <aep> dunno what to look for in the spec.
[11:44:15] <aep> it only sais operating voltage
[11:44:45] <aandrew> "5 volt tolerant" is a good term
[11:45:18] <aandrew> Generally speaking though... You do not put voltage beyond he rails on any mcu pin unless it specifically tells you it's ok
[11:45:54] <aep> yeah, i guess a resistor will do fine
[11:46:19] <aandrew> Almost every mcu pin has protection diodes
[11:46:55] <aandrew> You will blow them out and then a few microseconds later blow out the input structure
[11:47:47] <aandrew> A resistor limits the current and can protect the diode, or you can add an external diode which will have a MUCH higher current carrying capacity
[11:50:01] <aep> uh you can limit.. voltage with a diode?
[11:50:14] <aep> i dont understand how those diodes work anyway
[12:21:58] <tpw_rules> aep: i think he means with a zener diode
[12:55:02] <naquad> i've got some very odd USART behavior: it looks like it sends data twice. at least thats what i see on the terminal. data is sent synchronously (wait while (!(UCSR0A & _BV(UDRE0)); UDR0 = transmitted_char) and is in the ATOMIC_BLOCK
[12:55:08] <naquad> any ideas what could that be?
[12:55:33] <Tom_itx> duplex wrong?
[12:56:19] <Tom_itx> that's the most obvious
[12:56:37] <naquad> duplex? any more details?
[12:56:57] <Tom_itx> full or half duplex on your receiving terminal
[12:57:16] <naquad> no such setting :(
[12:57:54] <Tom_itx> is so
[12:57:54] <naquad> could that be because of transmission is being synchronous while receive is made through ISR?
[12:58:35] <Tom_itx> i won't rule anything out until you fix it
[12:58:58] <naquad> https://gist.github.com/89419d5337de6fab24c8 - thats the code, just in case if someone will see the problem at a glance
[13:01:49] <naquad> somehow reconnecting has helped 0o
[13:10:22] <aep> is voltage drop on a diode constant? or does it change with... voltage or current?
[13:11:12] <aep> a spec i read says the diode has Vfwd 1.2V, i guess that means... voltage drop. but it doesnt say anything about when
[13:12:07] <Tom_itx> usually it's .6 or .7
[13:12:19] <aep> its a huge diode. i need 2A
[13:12:30] <aep> trying to get 5V to 4V at 2A
[13:13:06] <aep> but its 4.5-5.5V and that thing needs 4.0-4.4V :/
[13:14:50] <Tom_itx> use more diodes
[13:15:06] <aep> nah, the diode i have has 1.2V drop
[13:15:24] <aep> i'm more worried about how it fluctuates
[13:56:24] <kdehl> I wonder, how should I make a function that returns a list of files in a directory? I don't want to return an entire linked list, that would take up too much RAM.
[13:56:56] <kdehl> How about one function that returns the number of files in a dir, and then another that returns the name of _one_ file in the dir, that you call repeatedly?
[13:57:05] <LeoNerd> Make a triplet like opendir/readdir/closedir
[13:57:08] <kdehl> That would generate a lot of reads.
[13:57:24] <kdehl> How do you mean?
[16:16:02] <Whistlepig> hello
[16:16:27] <Whistlepig> I am having some trouble debugging my ATmega32u4 application in AVR studio when using an external makefile. Is there any trick?
[19:43:20] <FoxGT> What does ND mean in item number?
[19:49:38] <rue_house> NOT DISCLOSED
[19:49:56] <rue_house> it qequires a higher priveledge level
[19:59:16] <FoxGT> Ah. Thank you.
[21:16:02] <postmodern> so i'm trying to communicate to a ili9341 via the 8bit parallel interface
[21:16:30] <postmodern> i have my atmega328p doing SPI through a shift register, to split each byte into 8 separate lines
[21:16:44] <postmodern> only problem is i can only blank the screen
[21:16:54] <postmodern> all other commands don't seem to be recognized
[21:20:00] <Casper> check the timing
[21:21:19] <postmodern> so i looked at other ili9341 driver code that used parallel, and they have no delays
[21:21:44] <postmodern> although most of it is for the raspberry pi, and they use GPIO pins instead of SPI->shift register
[21:24:00] <postmodern> hmm removed all delays and still not happening