#avr | Logs for 2012-06-25

Back
[11:16:03] <theos> hey
[12:32:06] <Maxxed> im looking to put toether a lil project that will kick a few relays on at various times,what would be the best way to do this
[12:32:12] <Maxxed> im looking at using a RTC
[12:32:25] <Maxxed> should i just keep polling the RTC for time?
[12:32:46] <Maxxed> ie. if curtime = time to flip on relay, do it
[12:33:00] <Maxxed> it seems kinda ugly to poll the rtc in a loop
[12:33:16] <Maxxed> any better ideas?
[12:33:20] <OndraSter> interrupts
[12:33:37] <Maxxed> have the RTC generate an interupt every 60 sec or something?
[12:33:48] <OndraSter> for exaple
[12:33:50] <Maxxed> er, every sec, what ever
[12:33:53] <OndraSter> more like 1 sec :)
[12:33:57] <Maxxed> yeah ;)
[12:34:22] <Maxxed> yeah, that sounds like a better way to do it.. why the hell didnt i think of that in the first place... geesh
[12:34:25] <Maxxed> hehe
[12:37:09] <Maxxed> ya looks like the DS1307 kicks out a 1hz square wave, so this is prob the best bet
[12:37:12] <Maxxed> thx OndraSter :)
[12:37:15] <specing> Maxxed: you could also use a $0.1 32k crystal ...
[12:37:19] <OndraSter> yeah
[12:37:24] <OndraSter> right to TIMER1 or whichever
[12:37:36] <OndraSter> it has builtin caps for 32kHz xtal
[12:37:36] <Maxxed> well the micro im using only has onetimmer
[12:37:39] <specing> or is it $0.05?
[12:37:41] <OndraSter> huh
[12:37:41] <Maxxed> n i dont wana run it slow as hell
[12:37:42] <OndraSter> what uC?
[12:37:47] <Maxxed> er, 328 i think
[12:37:53] <OndraSter> 328 has at least 3 timers
[12:37:58] <specing> lol
[12:37:59] <Maxxed> il have to check, its a the house
[12:38:10] * specing slaps Maxxed around with a small trout
[12:38:11] <Maxxed> well hell if thats the case i can avoid the rtc
[12:38:13] <Maxxed> :p
[12:38:37] <Maxxed> ah, its a atmega 32u4
[12:39:19] <Maxxed> i guess i can pick up a micro that will allow me to divide down to 1 sec
[12:39:37] <Maxxed> but then i have to do all the clock logic n crap, n im lazy
[12:39:38] <Maxxed> hehe
[12:39:46] <specing> ... which is just about every AVR out there
[12:40:50] <Maxxed> rtc is the lazy mans aproach ;)
[12:41:39] <specing> Orly?
[12:41:54] <Maxxed> n'deed :)
[12:41:59] <specing> It would require acquiring it, reading it datasheet, wiring it up,...
[12:42:15] <specing> I could program 10 AVRs in that time
[12:42:21] <specing> *atleast*
[12:42:23] <Maxxed> i was just gona use the 32u4, i have a hand fullof them laying about
[12:43:06] <Maxxed> i mike poke around for some ideas on the interwebs
[12:43:17] <Maxxed> s/mike/might
[12:44:21] <OndraSter> HE'S BACK!
[12:44:21] <OndraSter> wooo
[12:44:25] <OndraSter> ;D
[12:44:26] <Maxxed> i want the micro to run at full spec'd speed, its gona be running as an http server
[12:46:27] <asteve> hah, http server?
[12:46:42] <asteve> serving completely static page; not pages because that would take up the 20kb of memory
[12:47:44] <Maxxed> iv been playing with adam dunkles uip stack, it seems to work pretty well for what im trying to do
[13:51:45] <ziph> Why do I have to stay around for an answer?
[13:52:10] <ziph> ;)
[13:52:10] <Tom_itx> because you won't get one if you leave
[13:52:12] <Tom_itx> :)
[13:52:19] <ziph> Hey Tom. :)
[13:53:24] <Tom_itx> real brain power: http://www2.electronicproducts.com/How_MIT_s_glucose_based_fuel_cell_uses_the_brain_to_power_bioelectric_devices-article-fajb_glucose_fuel_cell_jun2012-html.aspx
[13:55:17] <Tom_itx> just don't hit the 'fast charge' button
[13:56:58] <ziph> "Another problem that scientists found with these glucose fuel cells was that they used enzymes to extract electrons from the glucose molecules. This proved impractical for long-term implementation in the body as they eventually ceased to function efficiently."
[13:57:19] <ziph> What's the bet the immune system got pissed about the mystery protein they were using. :)
[14:02:55] <dirty_d> hmm, any other links to this datasheet for atxmega32a4u? http://www.atmel.com/Images/doc8387.pdf
[14:03:09] <dirty_d> that ones is a file that contains "Dummy File for doc8387.pdf"
[14:10:45] <OndraSter> fail :D
[14:20:44] <toxie> hello everybody
[14:20:53] <toxie> i have an issue with an at90usb1286
[14:21:35] <toxie> i was developing a program, and i downloaded one program, after that the uC stopped to respond via spi and bootloader also
[14:22:02] <OndraSter> toxie, hmm what did you flash? :)
[14:22:04] <toxie> luckily the program in the uC is opening a serial port (usb one)
[14:22:18] <dirty_d> could PDI be bit banged on from a raspberry pi's gpio?
[14:22:18] <toxie> its an arduino code, i could send you
[14:22:31] <OndraSter> doesn't arduino use FTDI?
[14:22:44] <toxie> its a custom board
[14:22:48] <toxie> but with arduino code
[14:24:11] <toxie> here is the code OndraSter
[14:24:12] <toxie> http://pastie.org/4150040
[14:24:52] <toxie> the interesting part is that it is sending data to the pc, but cannot access it, the jtag is unfortunately disabled :(
[14:28:26] <toxie> my biggest concern is how to get the controller to let me download a new code to erase this one
[14:29:57] <toxie> the fuse bits are low 0xde high 0xdb extended 0xf0
[14:35:50] <specing> See how #avr stopped responding after mentioning arduino code? :D
[14:36:36] <toxie> it was working properly
[14:37:58] <toxie> also i dont know why the bootloader is not answering :/
[14:44:30] <toxie> any advice is welcome
[14:45:50] <specing> probe with a scope
[14:50:19] <toxie> ok just tell me what to look
[14:51:02] <specing> Idk, everything you can
[14:51:37] <specing> Also HVP probably works
[14:52:49] <toxie> can stk500 do the at90usb1286 ?
[14:53:08] <toxie> i know i will have to solder a lot of wires but i will deal with it
[15:26:06] <toxie> i can see the controller is bringing up the ttyACM0
[15:26:38] <toxie> when the code is running it is sending some data to ttyACM0, and the controller is getting warm
[15:27:12] <toxie> when i pull the reset to gnd it is starting to cool down
[15:28:10] <toxie> so the controller should be alive
[15:28:28] <toxie> but dont know why the bootloader is not activating
[15:29:24] <toxie> but dont know why the bootloader is not activating
[15:32:04] <toxie> also interesting, when i reset the controller it is behaving like its not resetted, i mean the ttyACM0 is still there until i disconnect the usb cable from at90usb1286
[21:43:43] * rue_mohr looks around
[21:43:50] <rue_mohr> is everyone being respectable?
[22:10:20] <LemLap> rue_mohr, just trying to sort out moving this beast
[22:10:21] <LemLap> http://imgur.com/a/3tcxE
[22:23:14] <rue_mohr> looks like steppers, whats the challange
[22:23:39] <Tom_itx> making them step?
[22:24:15] <Tom_itx> gawd what a mess this desk is
[22:24:20] <rue_mohr> is it a inkjet printer?
[22:24:46] <rue_mohr> LemLap, ?
[22:25:19] <LemLap> 2 x 3 meter flatbed inkjet printer with a 2.5 x 5 meter frame weighing 2.5 ton
[22:25:38] <rue_mohr> thats what I started to think it looked like
[22:25:51] <rue_mohr> you making it print or repurposing it?
[22:27:15] <rue_mohr> ... I think those are DC gearmotors
[23:41:23] <Microboter> Newb question: I thought that you needed to #include <inttypes.h> to use uint8_t. I tried it without the include and I was still able to compile with studio 6. Is the include not needed anymore?