#avr | Logs for 2014-05-03

Back
[02:21:18] <perole> atmel studio 6.1 is the way to do go?
[02:21:23] <perole> for atmega8515.
[02:22:48] <w|zzy> Sure. If you can run it
[02:24:18] <perole> I just installed it on an winxp guest on virtualbox
[03:53:07] <Fleck> perole: codeblocks is ok also, runs on Linux, OSX and Win
[04:05:54] <perole> I'm 'just' going to port a project from pic18f -> atmega8515
[04:06:24] <perole> so ideally would like to spend as little time as possible struggling with tools
[04:08:20] <Fleck> ohh, then go with atmel studio! :)
[04:08:31] <perole> the asf stuff looked promising, but no out of the box for 8515
[04:24:10] <Thrashbarg> perole: ...have fun :)
[04:27:32] <clixxIO> hello, what's the popular topic for debate today
[04:27:58] <clixxIO> I'm trying to find a nice set of AVR pin macros for AVR-GCC
[04:38:47] <guanche> do you guys know of a webshop doing free shipping with a decent inventory?
[04:39:05] <guanche> so far I've seen taydaelectronics, but it's mostly old stuff, it seems
[05:26:17] <megal0maniac_afk> This is just madness: https://www.indiegogo.com/projects/arduissimo-multicore-arduino-for-more-arduino-and-raspberry-pi-interfacing#home
[05:41:58] <clixxIO> yeah
[06:19:43] <t4nk145> hello!!!
[06:21:18] <clixxIO> Hi there t4nk145, how's it going?
[06:21:40] <t4nk145> hello...
[06:21:58] <t4nk145> i just started on avr's..
[06:22:09] <t4nk145> im having trouble making them work
[06:22:22] <t4nk145> could u help
[06:22:26] <t4nk145> ?
[06:22:44] <clixxIO> sure,which AVR
[06:22:46] <clixxIO> ?
[06:22:57] <t4nk145> atmega168
[06:23:12] <t4nk145> i used arduino to program it
[06:23:13] <clixxIO> what's the problem?
[06:23:39] <t4nk145> it gives signature error
[06:23:47] <clixxIO> Sure
[06:24:14] <t4nk145> I checked all the connections nothing wrong with them
[06:24:36] <clixxIO> What you are seeing is an avrdude error
[06:24:45] <t4nk145> yup
[06:24:56] <t4nk145> what does it mean
[06:24:57] <clixxIO> probably, which is the gnu tool that does the upload to the mcu
[06:25:24] <clixxIO> avrdude is checking that it's loading the right software onto the right mcu
[06:25:36] <clixxIO> because otherwise things might not work
[06:26:17] <clixxIO> Arduino is designed for their hardware. So if you are using it for other mcu's then there might/will be problems
[06:26:57] <t4nk145> ok
[06:27:24] <t4nk145> do u know how to program avr using parallel port
[06:27:27] <clixxIO> There's a way of modifying Arduino software, including boards.txt or some file to allow you to build and upload software for that mcu
[06:27:57] <clixxIO> I've never done it personally, I use one of Tom's ISP programmers
[06:29:04] <clixxIO> which has been working well
[06:30:50] <t4nk145> ok thanks
[06:31:53] <clixxIO> why did you choose the atmega168 ?
[06:33:35] <t4nk145> no particular reason
[06:33:50] <t4nk145> just wantend to get into avr world
[06:35:25] <t4nk145> i saw a book explainig how to program avr's using arduino but it did'nt work for me
[06:35:30] <t4nk145> :(
[06:41:02] <clixxIO> The easiest way is to use Arduino, but there are other options available too
[06:41:31] <clixxIO> I started on Arduino, but have moved away from it now
[06:42:13] <clixxIO> It's easy to outgrow
[06:43:17] <clixxIO> my favourite at the moment is the much smaller Attiny85
[06:46:57] <clixxIO> It sounds like you have avrdude working correctly
[06:47:08] <clixxIO> you can probably get it working from the command line
[06:47:29] <t4nk145> yup i have avr dude working
[06:47:30] <clixxIO> It's possible that you are only 1-15 minutes away from having it working
[06:47:47] <t4nk145> and im on linux
[06:48:26] <clixxIO> do you have AVR-GCC?
[06:48:31] <t4nk145> yup
[06:48:56] <clixxIO> the command line is something like this : avrdude -c avrispv2 -P usb -p atmega168 -U flash:w:$(PROGRAM).hex
[06:49:50] <clixxIO> If you were to run something like that from the command line you could expect it to work
[06:50:35] <t4nk145> i dont have any programmef of sort
[06:50:45] <t4nk145> i have an arduino
[06:51:53] <t4nk145> having come to know that i can program an avr with arduino i did'nt buy a programmer
[06:52:30] <megal0maniac_afk> t4nk145: Firstly, could you post the actual error that you're getting?
[06:52:54] <megal0maniac_afk> Arduino supports the 168 as it was on previous versions
[06:54:08] <megal0maniac_afk> Chances are you can just select the Arduino Diecimila (or any Arduino with an atmega168) as your board and it will work
[06:54:31] <clixxIO> yes, but the atmega168 will need to have the Arduino bootloader
[06:55:08] <megal0maniac_afk> Ah, that too
[06:55:36] <t4nk145> Yikes! Invalid device signature
[06:55:45] <t4nk145> that was the error
[06:55:55] <clixxIO> Invalid device signature is good
[06:56:10] <megal0maniac_afk> clixxIO: Not if it's ffffff
[06:56:36] <t4nk145> it did'nt give any number
[06:56:37] <clixxIO> I slap mine to the bin if it tries to tell me that
[06:57:11] <t4nk145> just invalid device signature
[06:57:23] <megal0maniac_afk> t4nk145: We don't know what signature you're actually getting, whether or not your atmega has the arduino bootloader, which board you've selected in Arduino, what you're using to connect your atmega to your computer, how you're connecting that to your atmega, etc.
[06:58:15] <megal0maniac_afk> clixxIO: I check my connections and oscillator configuration if it tries to tell me that. Then it usually stops telling me that and works
[06:58:15] <t4nk145> i dont have a bootloader on it
[06:58:22] * megal0maniac_afk digs through clixxIO's bin
[06:59:22] <clixxIO> are you programming via ISP? what programmer are you using?
[07:05:27] <megal0maniac_afk> Too many questions :)
[07:07:01] <clixxIO> yeah
[07:48:38] <Fleck> tzanger: here?
[07:49:10] <tzanger> yes
[07:49:12] <tzanger> just by chance
[07:49:15] <Fleck> :)
[07:49:23] <Fleck> you saw my msg?
[07:49:31] <Fleck> *did you
[07:50:32] <Fleck> [23:51:32] <Fleck> tzanger: hey, I just saw a link you gave me, about op-amps... in 2014.03.28 :D
[07:50:58] <Fleck> you are the best tzanger, thank you so much! That circuit works and is soooo simple and amazing!!!
[07:51:19] <tzanger> haha nice. glad it worked
[07:51:46] <Fleck> I understand the principle now!
[07:51:56] <Fleck> and can make different intervals as needed! :)
[07:53:06] <tzanger> perfect. what was the application?
[07:54:41] <Fleck> voltage metter for 4x12V batteries 42V is 10.5V each, so no need to measure less, and 62V is 15.5V - don't charge more! :D So no need to measure more, and 0V - 62V for 10bit ADC... naaah, big interval, 0V-22V much better!
[07:58:24] <Fleck> 0V-22V to 0V-5V for adc was no problem, but that SHIFT was a problem for me :P but it's so simple... shame on me!
[08:00:43] <Thrashbarg> 0-22V to 0-5V would be a resistive divider I guess? Shifting it would be analogue addition?
[08:01:11] <tzanger> ahh. yes. op amps are great for that as well as for "unloading" a high impedance source
[08:09:43] <Fleck> Thrashbarg: yes, first you calc factor, 22:5 is a factor of 4.4, next you need to calc constant voltage for op-amps negative input, as 40V is the minimum, you divide it by 4.4 and get 9.09V, so negative input should be 9.09V all the time, next you divide measured voltage in the same maner so that 40V is 9.09 :) and 62V will be 14.09V for opamps positive input
[08:09:56] <Fleck> and output you get - from 0V to 5V ;)
[08:10:20] <Thrashbarg> cool
[08:18:04] <Fleck> Thrashbarg: http://im9.eu/picture/g324730 << this is for 42V to 62V, so that factor is 4, but it's not ideal, you need potentiometers for 7.8k and 3.3k to get it right, precision ones! :D but, I can try to find better factors that suits my needs! :) power supply is 24V there, so I get 10.5V for opamps negative input
[08:18:43] <Fleck> opamps -V is ground
[08:19:13] <Thrashbarg> ok and you're using a rail-to-rail opamp or something which doesn't crap out when it's at 0V? :P
[08:20:13] <Fleck> I have not built it yet!
[08:20:34] <Thrashbarg> my advice is to avoid TL071's and such haha
[08:20:36] <Fleck> but +V is at 24V
[08:20:46] <Thrashbarg> yeah so you have plenty of headroom for that side
[08:21:18] <Fleck> yep
[08:21:49] <Thrashbarg> you only need something that's designed to work on single supply rails
[08:21:54] <Thrashbarg> you have plenty of choice :P
[08:22:01] <Fleck> suggest some
[08:22:16] <Thrashbarg> well where will you be shopping for one?
[08:22:21] <Fleck> have those http://www.ti.com/lit/ds/symlink/lm124-n.pdf
[08:22:28] <Fleck> and others
[08:23:17] <Thrashbarg> the LMx24's are good
[08:23:48] <Thrashbarg> slow like a uA741 but they operate to ground
[08:24:10] <Thrashbarg> (well.... not QUITE as bad as a 741)
[08:24:11] <Fleck> LM239
[08:24:35] <Thrashbarg> 239 is a comparator
[08:24:50] <Thrashbarg> somewhat different to an op-amp
[08:24:57] <Fleck> LM339
[08:25:06] <Thrashbarg> quad comparator, same thing
[08:25:28] <Thrashbarg> they're like op-amps but only have an open collector transistor for the output
[08:26:04] <Thrashbarg> so they need a pullup resistor or a current source, and are really only supposed to switch between + and ground
[08:26:51] <Fleck> and those: http://pdf.datasheetcatalog.com/datasheet/HitachiSemiconductor/mXrxryr.pdf
[08:27:36] <Fleck> and http://www.ti.com/lit/ds/symlink/ne5532.pdf
[08:27:38] <Fleck> :D
[08:28:25] <Thrashbarg> heh
[08:28:57] <Fleck> but suggest some, maybe I can get them easly!
[08:29:03] <Fleck> fast one
[08:29:54] <Thrashbarg> how fast? hundreds of MHz xD
[08:30:07] <Thrashbarg> and do you need just one?
[08:30:22] <Fleck> yes, but dual and quad is ok also
[08:30:35] <Fleck> just suggest, Ill write a note... :) maybe someday!
[08:33:09] <Thrashbarg> yea minimal research suggests either the LM324 you've already got or an LM358 which is the same in a dual device 8-pin package
[08:33:30] <Thrashbarg> if you want anything else you'd be after something exotic :P
[08:34:16] <Fleck> LM358 is 1MHz
[08:34:28] <Fleck> can get it at local store! :)
[08:34:35] <Thrashbarg> yeah same as the 324.... how fast are you sampling at?
[08:35:00] <Fleck> not so fast
[08:35:31] <Thrashbarg> in that circuit you'd probably have a bandwith of 500kHz
[08:35:45] <Thrashbarg> also what's the purpose of the 20k resistor to ground? Just for simulation?
[08:36:11] <Fleck> that's a q. for tzanger! :)
[08:36:17] <Thrashbarg> heh
[08:36:44] <Thrashbarg> that circuit could be simplified to 4 resistors IMO :P
[08:36:55] <Thrashbarg> but given ten EE's you'll have eleven opinions...
[08:38:45] <Fleck> :)
[08:39:46] <Fleck> Thrashbarg: using att13 with 10MHz external clock, so, no clue what div factor is for ADC by default
[08:41:20] <Thrashbarg> ok
[08:41:37] <Thrashbarg> depends really on how quickly the output of what you're measuring changes
[08:42:31] <Fleck> I need one update in one second :D no need to have faster/more, as humans can't handle more easly! :D
[08:42:45] <Thrashbarg> good
[08:43:02] <Thrashbarg> so a 1MHz op-amp is fine :P
[08:43:10] <Fleck> hehe, I think so, yes! :D
[08:43:24] <Thrashbarg> you said the voltage you're reading is from 0-22V?
[08:43:36] <Fleck> 40 to 62
[08:43:41] <Thrashbarg> ah yep
[08:43:45] <Fleck> in that circuit 42-62
[08:43:50] <Thrashbarg> ok
[08:44:21] <Thrashbarg> and you're measuring the battery
[08:44:27] <Fleck> I can't give you a link to that simulation, cause I can't copy it, dunno why, something about linux and java I guess
[08:44:38] <Thrashbarg> sure
[08:45:06] <Thrashbarg> or are you measuring the input which is labeled +42V... I assume you are
[08:45:12] <Fleck> yes
[08:45:33] <Fleck> I am measuring that input - at that moment set to 42V
[08:45:53] <Thrashbarg> and the battery provides the offset
[08:46:31] <Fleck> yes
[08:47:14] <Fleck> a vreg or... zener regulated, dunno, something that fits and off you go
[08:51:47] <Fleck> funny part is that I can copy/paste that link in java :D but can't paste it outside :P
[08:52:11] <Thrashbarg> ctrl+c/v or middle click?
[08:52:23] <Fleck> dosn't work
[08:52:27] <Thrashbarg> hmm
[08:52:43] <Fleck> in IRC I still got old clipboard content! :D
[08:52:58] <Fleck> but ctrl + v is ok in that simulation Export window
[08:53:00] <Fleck> weird
[08:53:08] <Thrashbarg> yea
[08:53:24] <Fleck> ctrl + x also ok in javas export window :D
[09:03:45] <clixxIO> does anyone know how to link against a static library with AVR-GCC?
[09:03:54] <clixxIO> in a makefile
[09:04:28] <clixxIO> here's my command line [that works] avr-gcc -Wall -g -Os -mmcu=attiny85 ../libraries/libclixxIO_AVR_attiny85.a -o hello.elf hello.o
[09:06:38] <clixxIO> when I use a makefile, it doesn't seem to use LDFLAGS or LDLIBS
[09:06:58] <clixxIO> and just does this : 'avr-gcc -Wall -g -Os -mmcu=attiny85 -o hello.elf hello.o'
[09:12:37] <clixxIO> ok - far-heap that - fixed it
[09:16:49] <clixxIO> something simple
[09:18:15] <Daulity> any ideas on making a counter out of d-flipflops which have thier clocks tight together ?
[09:29:48] <Thrashbarg> Fleck: if you want, I've got a circuit here which uses an op-amp and five common value resistors to convert 40-62V to 0.7-4.7V
[09:30:38] <Fleck> sure, share! :)
[09:31:50] <Thrashbarg> Fleck: http://kaput.homeunix.org/~thrashbarg/fleck_circuit.png
[09:31:59] <Thrashbarg> assuming you're running off a regulated 24V supply...
[09:32:09] <Fleck> you can't copy link too? :D
[09:32:18] <Thrashbarg> I'm not going to bother
[09:33:07] <Fleck> ;p ok,thx! :)
[09:33:10] <Thrashbarg> actually
[09:33:11] <Thrashbarg> http://www.falstad.com/circuit/#%24+1+5.0E-6+0.6798259793203881+50+5.0+50%0Aa+272+256+352+256+0+15.0+-15.0+1000000.0%0Ar+224+192+384+192+0+3300.0%0Aw+352+256+384+256+0%0Aw+384+256+384+192+0%0Aw+272+240+224+240+0%0Aw+224+240+224+192+0%0AO+384+256+432+256+1%0Ar+224+192+224+80+0+12000.0%0AR+224+80+224+48+0+0+40.0+24.0+0.0+0.0+0.5%0Ar+224+272+224+368+0+10000.0%0Ar+144+272+224+272+0+82000.0%0Aw+224+272+272+272+0%0Ag+224+368+224+384+0%0AR+144
[09:33:11] <Thrashbarg> +272+64+272+0+4+40.0+11.0+51.0+0.0+0.5%0Ar+224+192+96+192+0+8200.0%0Ag+96+192+96+224+0%0AO+144+272+144+320+1%0Ao+6+64+0+34+5.0+9.765625E-5+0+-1%0A
[09:33:14] <Thrashbarg> 'cept it's huge
[09:33:16] <Fleck> saving this! :P
[09:33:29] <Fleck> ohh my :D
[09:34:00] <Thrashbarg> my analogue-fu is pretty much fiddle with the values until it works
[09:34:36] <clixxIO> I just realised how much flash an Attiny85 has, 8K, that's HUGE !!
[09:34:47] <Thrashbarg> just because my maths is so bad it'd take me longer to work it out that way...
[09:34:59] <Thrashbarg> clixxIO: for an 8-pin package?
[09:35:12] <clixxIO> is that right?
[09:35:25] <Thrashbarg> yup
[09:35:38] <clixxIO> 8K is huge
[09:35:49] <Casper> clixxIO: yeah 8k look like nothing, but it's when you start to code that you realise how much it is actually
[09:35:52] <Thrashbarg> well you can get them with 2k and 4k :P
[09:36:07] <clixxIO> I just deployed my non-optimized event framework, and that comes to 2K
[09:36:12] <Thrashbarg> heh
[09:36:37] <Thrashbarg> the question is is the ATtiny25 any cheaper than an ATtiny85 lol
[09:37:08] <clixxIO> I tried 13's not impressed
[09:38:05] <clixxIO> I get : "avrdude: 1900 bytes of flash verified"
[09:38:11] <Fleck> I use att13 as voltmeter :D
[09:42:02] <clixxIO> I haven't managed to get many useful projects with mine going yet
[09:42:32] <clixxIO> I'm trying to use one as a temperature sensor at the moment
[09:42:56] <Fleck> yeah! Another good way to use att13 :D
[09:42:56] <clixxIO> using the internal temperature sensor, then transmitting that out the serial port
[10:21:15] <pickletown> hi first time using irc
[10:21:48] <pickletown> need help with avr spi
[10:21:52] <Tom_itx> well you made it
[10:22:07] <pickletown> oh this works haha awesome
[10:22:59] <pickletown> i am trying to communicate between raspberry pi and an avr via spi
[10:23:57] <Tom_itx> make sure phase and polarity are correct
[10:24:11] <pickletown> sending a hex value down mosi is echoed back through the avr
[10:24:35] <pickletown> however occasionally the value jumps to 0 or 255
[10:24:48] <pickletown> is this a miss timing of the communications?
[10:24:53] <Tom_itx> maybe the master wasn't ready with data
[10:24:56] <pickletown> the avr is running at 12MHz
[10:25:40] <pickletown> how do i make sure it is ready?
[10:25:47] <Tom_itx> flag maybe
[10:25:52] <Tom_itx> interrupts
[10:26:07] <Tom_itx> but have a timeout built in
[10:26:10] <pickletown> through additonal lines?
[10:26:18] <Tom_itx> no
[10:26:37] <Tom_itx> spi uses sck, mosi, miso
[10:27:13] <Tom_itx> slow the pie down until you got it working
[10:27:20] <Tom_itx> then ramp up the sck rate
[10:27:38] <pickletown> ok thanks
[10:27:59] <Tom_itx> i'd eat the pie personally
[10:28:06] <pickletown> haha
[10:28:17] <pickletown> its for a university project
[10:28:24] <pickletown> im limited in what i can use
[10:28:44] <Tom_itx> start with a slower SCK rate unitl it's stable
[10:28:59] <Tom_itx> make sure all the GNDs are good etc
[10:29:07] <Tom_itx> noise affects things
[10:29:47] <pickletown> thanks
[10:30:37] <Tom_itx> make sure CPOL CPHA are set right
[10:30:42] <Tom_itx> phase and polarity
[10:30:51] <Tom_itx> and make sure the pie is set to 8bit
[10:31:11] <Tom_itx> some µC can do longer or shorter transfers but you want 8 bit
[10:31:40] <pickletown> oh thats a good point i hadnt thought about
[10:33:13] <Tom_itx> if all else fails buy a saleae logic analizer and plug it in the lines
[10:33:21] <Tom_itx> fantastic for debugging stuff like that
[10:33:49] <Tom_itx> if you're in it for school chances are you will use it later in life too
[10:34:13] <Tom_itx> https://www.saleae.com/
[10:34:20] <Tom_itx> i've got the 8 channel one
[10:34:26] <Tom_itx> all you really need
[10:35:40] <Tom_itx> haha the new saleae now has analog capture
[10:37:03] <Tom_itx> i didn't even know they had a logic4 unless that's new too
[10:38:49] <Tom_itx> the pro is alot faster and has -10 +10 inputs too
[10:39:40] * Lambda_Aurigae pats his pic32 based super logic shrimp homebuild.
[10:39:41] <Tom_itx> looks like they made some good changes
[10:40:14] <Lambda_Aurigae> guess I should call it the jumbo shrimp
[10:40:40] <Lambda_Aurigae> whats the saleae cost?
[10:40:56] <Tom_itx> from 99 to 499
[10:41:03] <Lambda_Aurigae> found it ....hehe
[10:41:04] <Tom_itx> depending on what you want
[10:41:28] <Tom_itx> if i were gonna do it over i'd get the pro 8
[10:41:40] <Tom_itx> but all they had when i got mine was the 8
[10:41:44] <Lambda_Aurigae> not available yet though.
[10:41:57] <Lambda_Aurigae> the site says pre-order for those.
[10:41:58] <Tom_itx> they've been sending me emails for a while now about it
[10:42:07] <Tom_itx> software update too
[10:42:14] <Tom_itx> dunno if that's available yet or not
[10:42:20] <Tom_itx> but you can test drive it free
[10:42:25] <Lambda_Aurigae> http://dangerousprototypes.com/docs/Logic_Shrimp_logic_analyzer
[10:42:30] <Lambda_Aurigae> built something similar to this.
[10:42:47] <Lambda_Aurigae> only using 1Mb SRAM chips and a pic32.
[10:43:51] <clixxIO> btw - has anybody used 'extern "C"' in avr-gcc, does it work?
[10:44:45] <clixxIO> here's my line : extern "C" void softuart_init(void);
[10:45:00] <Tom_itx> looks like the software update is on May 31st
[10:45:04] <clixxIO> core_AVR/softuart.h:93:8: error: expected identifier or ‘(’ before string constant
[10:46:01] <Lambda_Aurigae> clixxIO, where you getting that "C" in there?
[10:46:36] <clixxIO> I'm trying to reference an external C function
[10:46:40] <Lambda_Aurigae> oh, duh, nevermind.
[10:46:51] <Lambda_Aurigae> http://www.cplusplus.com/forum/general/1143/
[10:46:58] <Lambda_Aurigae> look at the definition layout in there.
[10:47:12] <Lambda_Aurigae> not sure if GCC for avr supports it though..
[10:48:26] <Lambda_Aurigae> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453
[10:49:24] <clixxIO> hmm - rubbing that magic in seemed to make the error jump to a different line
[10:49:47] <Lambda_Aurigae> look at that avrfreaks link on using extern "C"
[10:50:41] <Lambda_Aurigae> I don't pretend to understand the C++ stuff much but there's a lot of info in that post.
[10:54:21] <clixxIO> The knowledge existed somewhere in my brain at some time. But decades pass..
[10:54:59] <clixxIO> I've just got to go convert the lot now..
[10:57:26] <clixxIO> thanks
[14:05:55] <jadew> Lambda_Aurigae, what speed do you get from the home built LA?
[15:01:31] <Lambda_Aurigae> jadew, mostly it's free.
[15:02:23] <Lambda_Aurigae> built from scavenged parts and free samples.
[15:02:50] <jadew> I was asking about the speed
[15:02:56] <jadew> the sample speed
[15:03:07] <Lambda_Aurigae> 20MHz
[15:04:51] <Lambda_Aurigae> that's the rated speed of the sram chips and what I have it clocked at, just like the logic shrimp.
[15:07:00] <jadew> neat
[15:08:57] <Lambda_Aurigae> mine has 4 times the storage capacity than the logic shrimp.
[15:22:00] <jadew> is it talking the SUMP protocol?
[15:22:12] <Lambda_Aurigae> yeah.
[15:22:34] <jadew> doesn't have RLE tho, right?
[15:22:41] <Lambda_Aurigae> have a few tweakies to do on it yet...I kinda stole the logic shrimp software.
[15:22:45] <Lambda_Aurigae> not sure what RLE is.
[15:22:55] <jadew> run length encoding
[15:23:01] <jadew> basically compression of the data
[15:23:06] <Lambda_Aurigae> oh.
[15:23:07] <Lambda_Aurigae> no.
[18:52:41] <Brittany> I hope it's not bad form to ask this, but I'd really like some help on some AVR code if someone wouldn't mind.
[18:52:43] <Brittany> http://pastie.org/9137903
[18:53:01] <Brittany> The idea is that I have a character register that's sat there waiting for input from SPI master
[18:53:21] <Brittany> and then it stores that data when it comes through, one bit at a time.
[18:53:26] <Brittany> byte*
[18:53:50] <Brittany> I'm a bit of an amateur though and I haven't found many good examples to help me.
[19:09:58] <N2TOH> Brittany, may I inquire about the intended goal of your code? many time it can shed light as to the correct path to follow when your in a debugging quandary
[19:18:52] <Brittany> N2TOH: Right now i'm building an SPI module for both raspberry pi and for an AVR atmega644p. I'm looking to get a stream of chars coming in sequentially from the raspberry pi, the AVR chip as the slave then stores these characters into an array, and does some work on them, and then transmits it straight back to the raspberry pi.
[19:23:59] <N2TOH> very good, other then looking at your code. what else would you like to ask?
[19:29:28] <Brittany> N2TOH: Just tips as to why this isn't storing bits into an array.
[19:32:53] <N2TOH> without verifying the code myself, and just glossing over it I'd like to ask why your " We need to get a pic of you with about 100 pounds of Peaches from Sun High Orchards and a bunch of Sassy young Women with the caption line #2 goes from 0 to 256?
[19:33:34] <N2TOH> my ignorance of your compiler leads me to think it would like a high number under 255
[19:33:47] <Brittany> Ah.
[19:34:03] <N2TOH> maybeeven 255
[19:34:12] <N2TOH> maybe even*
[20:42:43] <tzanger> N2TOH: I'm a veteran embedded systems programmer and I have no idea what you just asked Brittany
[20:43:32] <tzanger> Brittany: part of getting help around here involves asking smart questions. you haven't done that yet
[20:44:01] <tzanger> start with something smaller, tell us what you'd like the code to do, what it is doing and what you've tried to fix it yourself.
[20:44:52] <tzanger> I probably won't be around to help but if you follow that advice I'm positive someone here will. I'm going to be on a 3h road trip in the next 20m or so
[20:48:42] <N2TOH> tzanger, I comprehend your comments, and I also understand why our current generation of youth never seems to get beyond retail employment. it's all about mindset...
[20:51:06] * N2TOH I'm willing to go out on a branch here and expose myself here to ridicule.
[20:52:36] <N2TOH> I'm going to do so by saying that those who only seek personal accolades are wasting not only their time, but also their life in feeding their own Narcissistic ego.
[20:54:18] <N2TOH> people who are here to grow need not respond, yet you are welcome to ask any question that may inclrease not only your own knowledge base but all who are willing to read on.
[21:15:00] <Tom_itx> i think several ppl in here have the exact same assignment
[21:15:09] <Tom_itx> interfacing a PI to an avr with SPI
[21:15:50] <Lambda_Aurigae> send me an rPI and I will make it work!
[21:16:06] <Tom_itx> the exact same thing came up this morning iirc
[21:28:09] <Tom_itx> yeah i doubt it could be that difficult
[21:28:51] <Jordan_U> Tom_itx: You're not helping Lambda_Aurigae get a free rPI.
[21:29:08] <Tom_itx> i wonder if pickletown and Brittany are at the same UNI
[21:29:43] <Tom_itx> sure seems to be the same assignment