#avr | Logs for 2014-02-26

Back
[01:20:22] <Sur3> hi sry fell asleep, thx for the recomendations, i will try it later
[01:37:41] <Sur3> outch the error was a semicolon too much.. xD
[02:43:04] <sb-fraits> Science!
[03:36:59] <RikusW> Hi abcminiuser__
[03:37:05] <abcminiuser__> SCIENCE!
[03:37:23] <abcminiuser__> Oh, hi RikusW
[03:37:50] <RikusW> I seem to have a little issue with ATmega32U2 and 32U4
[03:38:06] <RikusW> U2 does have a documented serial in the signature memory
[03:38:20] <RikusW> U4 seems to have the serial but its not documented
[03:38:35] <RikusW> I read it from 3 different U4's
[03:39:08] <RikusW> Atmel support is useless on this matter...... I need to talk to the chip engineers / fab :-P
[03:39:29] <RikusW> Atmel reply ->
[03:39:31] <RikusW> From the datasheet (7766F-AVR-11/10), ATmega32U4 does not contain Unique Serial Number. So we don't recommend that you use this function.
[03:39:47] * RikusW sighs
[03:40:04] <RikusW> I do need the serial... it seems to exist, but ....
[03:40:41] <RikusW> its for a commercial project, it the serial vanish there might be trouble...
[03:40:46] <RikusW> *if
[03:41:45] <RikusW> So basically Atmel support will parrot the datasheet back to me... :( I was hoping for something better
[03:42:22] <RikusW> abcminiuser__: seemsyou had enough of tech support ? ;)
[03:45:09] <abcminiuser__> RikusW, it
[03:45:16] <abcminiuser__> *it's got a serial, just use it
[03:45:24] <RikusW> heh
[03:45:28] <abcminiuser__> I asked the fab engineers myself when I needed it
[03:46:02] <RikusW> thanks :)
[03:46:02] <abcminiuser__> It's just the usual wafter/chip/lot/etc IDs, which you can then permutate into your own unique serial
[03:46:12] <abcminiuser__> If it ever disappears, some process engineer will cry
[03:46:20] <RikusW> lol
[03:46:53] <RikusW> interesting
[03:47:00] <RikusW> does other avrs contain it too ?
[03:47:08] <RikusW> besides usb ones ?
[03:48:28] <RikusW> guess I'll just try reading it from my m8's
[03:49:09] <RikusW> abcminiuser__: its comforting to know its critical to manufacture :)
[03:49:27] <RikusW> at least I can be reasonably sure it won't cease to exist
[03:49:54] <abcminiuser__> Can't say, they all exist but whether they are mapped to a user accessible space I'm not sure
[03:50:08] <abcminiuser__> (they might be accessible in test mode only for example)
[03:50:32] <RikusW> guess I'll just read some "serials" from avrs that I have more than one of
[03:51:21] <RikusW> abcminiuser__: btw you should have asked the fab engineer how it was even possible for Steffanx do erase his signature bytes :-P
[03:51:46] <abcminiuser__> I know roughly how
[03:51:48] <abcminiuser__> But can't say
[03:51:57] <RikusW> NDA ?
[03:52:04] <abcminiuser__> Ja
[03:54:19] <RikusW> So are you back in Australia now ?
[03:59:11] <abcminiuser__> Am indeed, working for www.lifx.co
[04:20:50] <Tom_itx> and liking it?
[04:39:56] <Roklobsta> still there?
[05:01:52] <Sur3> i'm off thx again, cya
[06:53:09] <ColdKeyboard> Is there some existing example on how to use SUMP protocol with some MCU to get cheap logic analyzer?
[07:11:00] <Tom_itx> google seems to think so
[07:11:02] <Tom_itx> http://papilio.cc/index.php?n=Papilio.SumpLogicAnalyzer
[07:11:10] <Tom_itx> http://sigrok.org/wiki/Openbench_Logic_Sniffer
[07:11:45] <Tom_itx> why not just get the openbench one?
[07:12:53] <Tom_itx> ColdKeyboard you'd likely spend more than that making your own board
[08:57:13] <repozitor> i got to this error
[08:57:14] <repozitor> "global RAM variables size 566 bytes is too large"
[08:57:19] <repozitor> how to fix it?
[09:04:54] <twnqx> use less global vars
[09:12:41] <blathijs> or buy a bigger chip :-)
[09:14:38] <Thrashbarg> or use fewer constants in RAM
[09:14:44] <Thrashbarg> PROGMEM
[09:15:30] <twnqx> he's gone anyway.
[09:15:42] <Thrashbarg> yes
[12:43:16] <lionrouge> hi!
[12:45:03] <lionrouge> i have such sentence in datasheet: "The pin driver is strong enough to drive LED displays directly". Is it safe? Have anyone tried?
[12:47:09] <LoRez> they'll source/sink 20mA. don't abuse them obviously.
[12:47:28] <megal0maniac_afk> LoRez: He's welcome to abuse them :)
[12:47:41] <LoRez> just going to cost him chips
[12:48:05] <megal0maniac_afk> That's okay. They aren't my chips
[12:50:06] <lionrouge> ))
[13:05:09] <naquad> is there any book recommendation for AVR programming?
[13:10:30] <megal0maniac_afk> Datasheet :)
[13:11:00] <megal0maniac_afk> Other than that, haven't found any good ones :(
[13:11:25] <naquad> megal0maniac_afk, to be honest i'm starting to understand that. datasheet for 168P is bigger than what i'm reading
[13:12:48] <megal0maniac_afk> Play around with it, ask questions here, read blog posts and other stuff. After a while, you'll get a feel for it and the datasheet will satisfy all of your needs
[13:16:07] <naquad> megal0maniac_afk, sounds like a plan, will try it, thanks
[13:24:42] <megal0maniac_afk> Gah. What is an "operator" in C? I don't mean + or -, I mean the actual word
[13:25:04] <megal0maniac_afk> For example operator=(uint8_t u) { u2s.WriteByte(address,u); return 0; };
[13:25:20] <PoppaVic> hahahahahahahaha
[13:25:58] <megal0maniac> Because I'm getting "missing type specifier - int assumed" and I need to fix it
[13:26:39] <megal0maniac> It's a type of sorts, or it seems to be
[13:27:34] <megal0maniac> Ooh.. operator overloading?
[13:27:47] <PoppaVic> that's not C
[13:27:51] <megal0maniac> PoppaVic: You appear to know _something_
[13:27:58] <megal0maniac> It's in a header file
[13:28:33] <megal0maniac> C++ ?
[13:28:33] <ColdKeyboard> Is there a solution to this Prolific PL2303 Code 10 Device won't start?
[13:28:41] <PoppaVic> of course it is - and it's still not C.. THis is me, running away as quick as I can
[13:28:42] <megal0maniac> ColdKeyboard: Yes, wrong driver
[13:28:50] <megal0maniac> PoppaVic: HALP
[13:28:55] <ColdKeyboard> megal0maniac: Where can I get "right" drivers? :)
[13:28:57] <megal0maniac> ColdKeyboard: One sec, I know a good one
[13:29:04] <ColdKeyboard> megal0maniac: thanks
[13:29:05] <PoppaVic> megal0maniac: C++, or some variant therein
[13:29:11] * ColdKeyboard fingers crossed that it works
[13:29:42] <megal0maniac> http://wouxun.us/Software/USB%20Drivers/PL2303_Prolific_GPS_AllInOne_1013.exe
[13:30:34] <ColdKeyboard> megal0maniac: Should I remove the drivers, reboot and then install or I can just go ahead and istall it?
[13:31:55] <megal0maniac> I can't remember how it installs, 'cos you could just point it to the new driver file. Otherwise uninstall and reboot can't hurt
[13:33:10] <ColdKeyboard> Hey... It seems that it works now :D
[13:33:20] <ColdKeyboard> I hope it does, thanks megal0maniac! :)
[13:33:55] <megal0maniac> It probably will. Hasn't failed me yet :)
[13:35:37] <megal0maniac> Could someone please tell me what to change here? I can't figure it out http://pastebin.com/0Urr7MVT
[16:03:21] <phinxy> If i get a button press interrupt it should cancel everything else and do the interrupt task first?
[16:10:06] <PoppaVic> what's to do? it records a press and continues
[16:10:33] <PoppaVic> it's an event - something must care about it
[16:11:00] <phinxy> i suspect that if my controller is sending data trough i2c it gets interrupted
[16:12:38] <PoppaVic> if so, you can ascertain it. If so, you can also disable interrupts.
[16:51:45] <phinxy> PoppaVic, after a little testing it seems like the display driver needs interrupts enabled to be able to draw an image
[16:52:07] <phinxy> so i guess ill just have to check button state in the main loop instead of interrupts?
[16:52:31] <PoppaVic> ah-hah
[16:53:24] <PoppaVic> I'd use a mainloop, yeah.. I'm not all that mcu savvy, but doing anything significant w/i an interrupt is usually bad-juju
[17:07:08] <Tom_itx> yup
[17:36:26] <hotch> sorry, that was the cmd, the error is "avrdude: initialization failed, rc=-1"
[18:05:34] <naquad> am i getting that right: timer/counter register a has no prescale settings?
[18:07:54] <Tom_itx> timers have prescalars associated with them
[18:10:16] <naquad> Tom_itx, i'm looking at datasheet section TTCR0A and i don't see anything look like prescaling set up
[18:10:27] <naquad> there's one for TCCR0B, but not for TCCR0A
[18:12:45] <Tom_itx> what chip?
[18:14:54] <naquad> ATMega169P
[18:14:56] <naquad> *168
[18:18:55] <Tom_itx> they share a prescalar
[18:19:04] <Tom_itx> CS00..CS02
[18:19:38] <Tom_itx> i think those are setup registers for the same timer
[18:19:53] <Tom_itx> TCCR0
[18:20:06] <Tom_itx> timer0
[18:22:33] <Tom_itx> P.139
[18:23:39] <hotch> Hey Tom_itx - can I PM you a question about buying one of your USBTiny Mkii programmers?
[18:23:48] <Tom_itx> i suppose
[18:24:10] <Tom_itx> or you could ask here
[18:25:02] <hotch> How fast would an order to another state take? Or rather how long until after purchase in the mail, what kind of shipping? thanks -
[18:25:16] <Tom_itx> i can ship it tomorrow AM
[18:25:28] <Tom_itx> what state?
[18:25:40] <PoppaVic> chaos!
[18:25:50] <Tom_itx> i've been there
[18:26:11] <Tom_itx> i've been to hell too
[18:26:24] <Tom_itx> serious...
[18:26:25] <PoppaVic> yeah, but it's a small place
[18:26:37] <PoppaVic> twisty lil roads thru it and gone
[18:27:33] <Tom_itx> https://www.google.com/maps/dir//Hell+Rd,+West+Bay,+Cayman+Islands/@19.3793218,-81.4411179,13z/data=!3m1!4b1!4m8!4m7!1m0!1m5!1m1!1s0x8f2f7ded3bce923f:0x87dad8e06c4cb98d!2m2!1d-81.406785!2d19.379325
[18:31:54] <Tom_itx> hotch what state are you in?
[18:32:04] <hotch> Tom_itx: CA
[18:32:14] <Tom_itx> 3-4 days USPS probably
[18:32:29] <Tom_itx> from KS
[18:32:41] <hotch> Awesome, about to buy one, not new to
[18:32:55] <hotch> Arduino but to AVR - is there decent info on pinout for the ISP?
[18:33:07] <Tom_itx> yep
[18:33:11] <Tom_itx> all on the pages
[18:33:42] * hotch hates how everything even ISPs are geared to Arduino not straight AVR - getting started is tough@
[18:33:50] <hotch> awesome thx.
[18:33:56] <Tom_itx> the site may be down for maintenance next week though
[18:34:02] <Tom_itx> so read what you need
[18:34:20] <Tom_itx> did you see my howto pages?
[18:34:43] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[18:37:01] <hotch> Reading now, great thanks Tom_itx . The boxed ISP means with the enclosure right?
[18:37:15] <Tom_itx> the blue one?
[18:37:18] <Tom_itx> yeah
[18:37:28] <Tom_itx> same programmer, different package
[18:38:59] <hotch> ordered. thanks Tom_itx .
[18:39:17] <Tom_itx> k, it'll go out tomorrow
[18:39:23] <Tom_itx> you'll get an email
[18:40:18] * hotch reads
[18:40:59] <Tom_itx> is your arduino a 6pin plug?
[18:41:04] <Tom_itx> it should just plug into it
[18:41:26] <Tom_itx> mine works on the arduino2560 just fine
[18:45:45] <hotch> Tom_itx: trying to program just AVRs now with AVRDUDE :P
[18:46:24] <hotch> I felt like I was learning ... how to buy and use other peoples circuits (Arduino) vs. learning electrical/lower level dev on the mcus.
[18:46:25] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/using_avrdude_index.php
[18:46:32] <Tom_itx> on windows or linux?
[18:47:18] <Tom_itx> if you use avrdude on windows, you will need to upload different firmware to the programmer
[18:47:22] <Tom_itx> otherwise you're fine
[18:47:38] <Tom_itx> it works as is on studio and avrdude under linux
[18:47:52] <Tom_itx> it's a windows usb driver issue
[18:50:14] <hotch> OS X
[18:50:42] <Tom_itx> it will work however you need their ver of avrdude iirc
[18:50:56] <hotch> I have avrdude setup via cross pack, and a hello world project with makefile and .c ready :P
[18:50:56] <Tom_itx> i don't have a mac but i did have some info on it...
[18:51:07] <Tom_itx> yeah, crosspak is what you need
[18:51:20] <Tom_itx> and iirc you use their avrdude ver
[18:52:18] <Tom_itx> http://www.obdev.at/products/crosspack/download.html
[18:52:35] <hotch> yeah
[18:52:51] <Tom_itx> not a road i've been down but others here have
[18:55:47] <Tom_itx> avrdude -c avrisp2 -p m328 -P usb -U flash:w:"/usr/local/avr/test.hex":a -e
[18:55:50] <Tom_itx> example cmd line
[18:55:51] <hotch> Tom_itx: your site is loaded with information. Do you work with AVRs professionally or a hobby (if I can ask)?
[18:55:58] <Tom_itx> hobby
[18:56:16] <naquad> is there any good reading on AVR timers? i have one ultimate question that i can't find answer for: is configuration shared between different timer channels (n[A-B])?
[18:56:30] <Tom_itx> naquad, dean's articles
[18:56:36] <naquad> erm where do i find them?
[18:56:43] <Tom_itx> on my site
[18:56:54] <Tom_itx> look down the menu on the left
[18:57:20] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/abcminiuser/articles/avr_timers_index.php
[18:57:28] <Tom_itx> and the one below it
[18:57:51] <naquad> i've just read that :(
[18:58:00] <naquad> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=50106
[18:58:01] <naquad> here
[18:58:23] <Tom_itx> yeah
[18:58:42] <Tom_itx> well what more do you want?
[18:59:54] <naquad> i want explicit answer, yes or no: TCCR0B has clock scaling bits, TCCR0A doesn't. does this mean setting scaling on TCCR0B will affect TCCR0A?
[19:00:13] <Tom_itx> yes
[19:00:19] <naquad> thank you!
[19:00:22] <Tom_itx> it's all affecting timer0
[19:00:26] <Tom_itx> different registers
[19:00:30] <Tom_itx> different bits
[19:00:41] <Tom_itx> look at the back of the pdf for the register list
[19:00:47] <naquad> i think that should be written in big red letters right in the first paragraph of timer description
[19:00:54] <Tom_itx> naw
[19:00:58] <Tom_itx> they want you to read it all
[19:01:17] <naquad> ha! read - not a problem, not forgetting - thats a problem
[19:01:27] <Tom_itx> the chart helps
[19:01:31] <Tom_itx> at the back
[19:02:21] <naquad> register summary?
[19:02:31] <Tom_itx> yeah
[19:39:23] <naquad> how does LCD 1602A interface with AVR? via USART?
[19:40:15] <Lambda_Aurigae> naquad, is that an hd44780 based LCD?
[19:40:20] <naquad> sort of
[19:40:57] <Lambda_Aurigae> http://www.nexuscyber.com/green-backlight-1602a-lcd-module-i2c-interface?gclid=CO7Yl-eS67wCFTBk7AodhxkA7Q
[19:41:05] <Lambda_Aurigae> looks like that?
[19:41:16] <naquad> thats it
[19:41:38] <naquad> but w/o that second pcb
[19:41:43] <naquad> with some chip on it and jumper
[19:41:55] <naquad> i2c interface
[19:42:15] <Lambda_Aurigae> then you just answered your own question.
[19:42:21] <naquad> so usart?
[19:42:26] <Lambda_Aurigae> no.
[19:42:28] <Lambda_Aurigae> i2c
[19:42:35] <naquad> not i2c, i meant w/o i2c pcb
[19:42:54] <Lambda_Aurigae> so just a bare lcd with the hd44780 chip on it and the display?
[19:42:56] <naquad> i've got only this part: http://www.nexuscyber.com/content/images/thumbs/0000134_green-backlight-1602a-lcd-module-i2c-interface.jpeg
[19:43:18] <Lambda_Aurigae> then it's parallel interfaced.
[19:43:23] <naquad> USART?
[19:43:26] <Lambda_Aurigae> no
[19:43:28] <Lambda_Aurigae> parallel!
[19:43:31] <Lambda_Aurigae> usart is serial
[19:43:31] <naquad> ...
[19:43:34] <Lambda_Aurigae> http://homepage.hispeed.ch/peterfleury/avr-lcd44780.html
[19:43:59] <Lambda_Aurigae> I usually use the 4 bit mode as shown part way down the page.
[19:44:33] <Lambda_Aurigae> there is even an LCD library with example code linked on that page.
[19:45:40] <naquad> it looks like i'll do so too because i don't have everything needed for sram mode
[19:45:42] <naquad> Lambda_Aurigae, thanks
[19:45:48] <Lambda_Aurigae> welcome.
[19:46:19] <naquad> hell, i even don't have 27pF capacitor or 4MHz crystal
[19:48:23] <Lambda_Aurigae> you don't need those for that to work...it will work just fine running from the internal RC oscillator.
[19:48:42] <Lambda_Aurigae> that page is rather old and I don't know if that chip he used had an internal oscillator back then.
[23:45:42] <naquad> in 4 bit mode how do i send data to lcd?
[23:45:58] <naquad> *lcd 1602a
[23:51:31] <Casper> you split the 8 bits in 2 nibbles
[23:51:37] <Casper> and send it in 2 transferts