#avr | Logs for 2015-05-21

Back
[02:51:55] <rue_bed> cernme1, what error
[03:50:40] <pepijndevos> Whoa, what is all this code about? https://www.refheap.com/101379 Only about 4 lines are mine. Are these the interrupt handlers or something/
[03:51:29] <pepijndevos> Assuming I start at 00, it jumps to some code that is not mine which rcalls to my code.
[03:54:52] <pepijndevos> It seems to initialise some IO register...
[04:08:03] <Xark> Yes, interrupt vectors/handlers. I believe 0 is the reset vector (and your code starts at 0xac - after a tiny bit of init).
[04:08:14] <Xark> I/O reg is stack pointer.
[04:08:29] <Xark> r1 is zeroed
[04:09:01] <Xark> Yes, SR and stack.
[04:09:49] <Xark> You your actual code starts at 0xbe. :)
[04:09:54] <Xark> So*
[04:35:20] <twnqx> it's not really "intterupt handlers", but close enough
[05:14:00] <Ad0> does anyone have a log() standalone func handy?
[05:28:35] <hypermagic> hi
[06:54:28] <pepijndevos> Xark, hmmm, weird, the code does not actually turn on the led like I expected.
[06:59:31] <pepijndevos> dooooh
[06:59:42] <pepijndevos> after I reset the chip it works -.-
[07:00:20] <pepijndevos> I disassembled a working C file and it produced identical assembly
[07:29:51] <pepijndevos> "The binary asforth images cannot be loaded/programmed using the Arduino Bootloader. An ICSP programmer (avrisp, etc) must be used to load the image." https://github.com/nfz/asforth Why is this the case?
[07:53:50] <dgtlmoon> greetings! :)
[07:54:28] <dgtlmoon> I have a 3.3v serial device, i'm getting data into my atmega328p but its not super reliable could this be why? should i install a 3.3V->5V voltage stepper?
[07:54:43] <dgtlmoon> TX/RX on the UART that is
[07:59:39] <twnqx> which device, and which diection is not reliable?
[07:59:57] <twnqx> also, what speed is the serial device, and what is the cpu clock`
[08:13:19] <dgtlmoon> twnqx, hey sorry, atmega328p
[08:13:30] <dgtlmoon> twnqx, 38400 and 8mhz
[08:14:12] <dgtlmoon> twnqx, i can send fine, the device that receives shows all is fine, but receiving from the device seems unreliable.. oscilloscope says RX on the atmega328p is 3.28v max
[08:14:43] <dgtlmoon> scanning the datasheet, no real USART voltage references
[08:25:39] <dgtlmoon> twnqx, so hmm.. ive tried different baud rates, similar results
[08:25:44] <dgtlmoon> i think its a timing issue somehow
[08:27:25] <dgtlmoon> into a USB/UART adaptor I see 0xAA, 0x0E, into the atmega328p i see 0xAA, 0x0F
[09:08:32] <twnqx> first of all, it's simple
[09:08:50] <twnqx> cmos is ~0.7*VCC, so ~3.5V for 5V vcc
[09:09:07] <twnqx> that being said, i so far did not have problems
[09:09:44] <twnqx> the other is, i meant the type of your usb2serial - are you sure i's even 5V tolerant?
[09:10:04] <twnqx> then there's the issue of clock deviation
[09:10:14] <twnqx> not sure how bad it is at 8mhz/38k4
[09:13:01] <twnqx> table 19 on page 193 of the datasheet ( http://www.atmel.com/images/doc8161.pdf ) gives some maximum deviation numbers
[09:13:52] * dunz0r just ordered 10 ATtiny85s
[09:13:54] <dunz0r> \o/
[09:14:05] <dunz0r> Now I just need to figure out what I should use them for
[09:14:20] <twnqx> dgtlmoon: ok, the table i have says 0.2% deviation at that rates, looks good
[09:14:52] <twnqx> lol dunz0r :P
[09:21:59] <dunz0r> I have one project in mind... but that leaves 9 more :D
[09:24:29] <dgtlmoon> twnqx, yeah, the signal looks stable on the oscilloscope
[09:25:30] <dgtlmoon> twnqx, USB2Serial is 5volt tollerant and i always get the right values.. TX from the 'device' into 'RX' on the atmega328p values dont seem right but its the same waveform on the sco
[09:25:33] <dgtlmoon> scope
[09:25:41] <dgtlmoon> i will get some screenshots i think in both cases and compare
[09:30:34] <twnqx> maybe i am just lucky that by 3.3v chip doesn't cause problems :)
[09:30:48] <twnqx> it is slightly out of spec, i think atmel guarantees only 2.5V
[09:31:33] <twnqx> 3.5*
[11:07:38] <dgtlmoon> twnqx, hey i gotta run, i'll get back to you later about it
[11:07:53] <dgtlmoon> twnqx, but thanks for the help
[11:07:58] <dgtlmoon> more debugging and probing required!
[11:09:00] <dgtlmoon> having a oscilloscope, even an entry level DS1052E is making things muuuuch easier
[12:31:25] <Jartza> atmel is getting rid of attiny88?
[15:16:21] <skroon> how can I program code to a SAM D21 from OSX?
[15:45:52] <Jartza>
[15:45:57] <Jartza> oops
[15:48:27] <Jartza> skroon: sam is arm, so you need to install arm toolchain and possible libs
[16:03:39] <pepijndevos> Am I correct that the bootloader can write the flash, but another program can not?
[16:04:16] <pepijndevos> Yay, self-modifying code!
[16:05:05] <angry_specing> you can rewrite yourself if the protection fuses allow it iirc
[16:08:10] <Jartza> skroon: there are lot of precompiled toolchains available
[16:08:32] <Jartza> for homebrew, macports and so on
[16:10:13] <Jartza> https://launchpad.net/gcc-arm-embedded
[16:12:37] <skroon> Jartza: cool, thanks
[16:12:57] <skroon> Jartza: i'm using homebrew
[16:16:25] <skroon> Jartza: this seems to be popular right? https://github.com/jsnyder/arm-eabi-toolchain
[16:19:04] <skroon> Jartza: i'm new to all this ARM stuff, so have to get used to all that new lingo and eco system :-)
[16:33:15] <skroon> Jartza: are you using 'bossa' as wel ?
[16:41:32] <angry_specing> you know the gcc project has failed when you have seperate projects for building GCC
[17:03:19] <hypermagic> have you ever used a code beautifier? :) http://uncrustify.sourceforge.net/ http://universalindent.sourceforge.net/ http://astyle.sourceforge.net/ http://sourceforge.net/projects/gcgreatcode/ ftp://ftp.gnu.org/gnu/indent/
[18:31:16] <eni23> hello at all. does anyone knows a hashing-library that runs on a atmega328?
[18:36:27] <hypermagic> eni23, you may try crc32
[18:36:41] <hypermagic> ofc shasums will work too if you can fit them
[18:37:33] <eni23> ofc?
[18:39:31] <eni23> crc32 does not really fit my needs, something like sha128 is is more likley
[18:40:16] <eni23> i know that there are chips for this but i having small hope that here is a software-solution for it
[18:42:59] <Lambda-Aurigae> use one from some open source linux app.
[18:44:23] <twnqx> you want 128+ bit hashes... on an 8bit cpu? really?
[18:44:53] <twnqx> where the necessary tables already exceed the available flash?
[18:45:23] <eni23> thats may be an argument
[18:45:54] <eni23> ok then, i will use one of those atmel-cryptochips..
[18:45:56] <twnqx> and "ofc" = "of course"
[18:46:47] <twnqx> oh, table size is not all that bad
[18:47:34] <twnqx> i remembered wrong; it's 64 * 32bit = 256 byte
[18:47:39] <twnqx> for sha256
[18:48:18] <twnqx> and iirc you'll need 256bits for state
[18:48:27] <twnqx> so another 32 byte
[18:48:32] <twnqx> (ram this time)
[18:49:40] <twnqx> and 64bytes to store the input data
[18:50:03] <Lambda-Aurigae> not to mention whatever ram is needed for doing the math in the first place.
[18:50:16] <eni23> my code uses about 200 byte right now so that would fit easy
[18:50:45] <twnqx> just looking at old verilog code
[18:50:53] <twnqx> so yeah, i guess it's pretty fesable
[18:51:23] <twnqx> i'd say 128-192byte ram + 256 byte data rom + code
[18:52:43] <twnqx> math is just xor, and, not, shift, 32bit addition
[19:55:15] <rue_house> do you ahve to calculate it all at once or can you 'walk' the calculation