#avr | Logs for 2015-02-11

Back
[00:01:27] <postmodern> ah I'm getting some data back, but it's all corrupted
[00:06:35] <postmodern> ah wrong baud rate
[00:16:48] <jerware> DDRB = 0xff; PORTB = 0b00000001; // should set PB0 (digital pin 8) to high. correct /
[00:17:23] <jerware> on the atmega328p that is.
[00:18:26] <N1njaneer> Correct.
[00:18:42] <jerware> my logic probe isn't picking up anything.
[00:19:09] <N1njaneer> Make sure it's grounded and looking for the correct logic level, for one :)
[00:19:17] <N1njaneer> Are you sure the code is loading correctly?
[00:21:20] <jerware> http://codepad.org/PBZHJArc
[00:21:30] <jerware> How do I make sure pin 8 is grounded?
[00:22:40] <N1njaneer> That should be okay on the code, however I would suggest using an "unsigned char" or "uint8_t" as the type to pass to the function call.
[00:23:00] <N1njaneer> Also, you have a semicolon inside the function call in the while loop
[00:23:40] <jerware> that's a typo.
[00:23:43] <jerware> that extra ;
[00:23:46] <jerware> from pasting
[00:23:52] <N1njaneer> okay :)
[00:25:05] <jerware> What can I do to trouble shoot this?
[00:25:13] <jerware> I have the dip package on the breadboard.
[00:25:39] <N1njaneer> Are you running from internal oscillator?
[00:25:55] <N1njaneer> I assume you are loading code via ISP correctly?
[00:26:09] <jerware> yes, because avrdude says it loads ok
[00:26:32] <N1njaneer> Have you stuck an LED on the output pin to see if it flashes?
[00:26:46] <jerware> yeah nothing.
[00:27:01] <jerware> the long end should touch the pin8, and the short end to ground. right?
[00:27:24] <N1njaneer> Depends on your LED - pin polarity isn't always standard
[00:27:50] <N1njaneer> I usually run LEDs with +5V to anode and the cathode to the microcontroller via a resistor. The micro can sink a lot more than it can source.
[00:28:10] <N1njaneer> Make sure the LED is wired the right way round and works.
[00:28:22] <N1njaneer> Tap it with a DVM set to measure diodes, it should light.
[00:32:20] <jerware> I'm powering the mcu with 5 volts. nothing on the led
[00:32:34] <N1njaneer> Have you confirmed the LED works, and is wired correctly?
[00:32:43] <jerware> yes it works.
[00:32:50] <N1njaneer> Also make sure the micro isn't being held in reset
[00:34:20] <jerware> you are the man. It was in reset.
[00:34:31] <N1njaneer> Working now? :)
[00:34:45] <N1njaneer> There's not a whole lot else that could be keeping it from working in that setup! :)
[00:34:45] <jerware> yuppers!! Thanks. learned something new too.
[00:34:53] <N1njaneer> Awesome. Glad to help.
[00:34:57] <N1njaneer> Now make it do cool stuff!
[01:36:26] <Jartza> morning
[01:36:48] <malinus> morning Jartza
[01:36:57] <malinus> Jartza: working on anything interesting?
[01:37:22] <Jartza> nothing too interesting I guess :)
[01:37:44] <Jartza> all kind of stuff that needs to be done to get tagsu production run going
[01:38:23] <Jartza> and hacking my Opel Astra ALDL & center console display :D
[01:41:17] <Jartza> as I changed the radio-casette-player of my car to something more modern, the center console display went blank
[01:42:01] <Jartza> so I did put attiny84 in there to read data from aldl and display it on the center console display (like speed/rpm etc. selectable via button)
[01:43:17] <Jartza> then I'm hiding small 4 pin plug to center console that connects to external display. if the external display is detected when the attiny84 boots, it goes into diagnostics-mode and displays possible error codes as human readable text on the display
[01:44:31] <Jartza> this kind of display, RGB backlight adjusted to match the Opel yellow display https://www.dropbox.com/s/ziv64jw6xa8jwj4/IMG_20150210_211835~2.jpg :)
[01:44:57] <malinus> Jartza: which car do you have=
[01:45:07] <Jartza> https://www.dropbox.com/s/wqx2k4yxzqdmmfv/IMG_20150124_212115~2.jpg
[01:45:23] <Jartza> malinus: as a 2nd car I have Opel Astra -94 :)
[01:45:30] <Jartza> Opel/Vauxhall/Holden/GM
[01:45:33] <Jartza> goes with many names
[01:46:46] <malinus> I didn't even know that mid-range cars from the mid 90's would have computers
[01:48:24] <Jartza> ohh, even some from the 80's have some kind of ecus
[01:49:54] <Jartza> that home-etched pcb also looks quite retro, but it fits the 90's :D
[01:50:02] <Jartza> with yellow led, of course
[01:50:41] <Jartza> http://www.rolandgruber.de/opel_tid/scroll3.jpg
[01:50:46] <Jartza> the built-in display looks like that
[01:52:00] <Jartza> 1x8 characters plus dots after each letter/character
[01:53:44] <Jartza> the clock and the thermometer are controlled by the display electronics, so I don't need to touch them
[09:45:44] <anonnumberanon> is i2c with arduino 100 Khz? can i receive 115000 baud with uart and also send simultaneously with i2c at 100 Khz, how does 100 Khz translate in bits per second? Can I also do heavy caluculation (PID control from gyroscope and accelerometer input) at the same time?
[09:46:26] <anonnumberanon> Reading the Wire lib right now to try and understand it all.
[09:46:38] <LeoNerd> I2C is 8bit data + 1 bit of ACK
[09:46:56] <LeoNerd> Of course, clock stretching may mean that "100kHz" I2C doesn't actually make 100,000 clock transitions every second
[09:47:05] <LeoNerd> It's an upper limit; slaves might stretch it
[16:06:00] <jerware> does avr-g++ have string.h and memset ?
[17:02:15] <LeoNerd> Ohhohh... my HVSP controller boards have arrived. Might try building one up
[17:22:14] <jaggzt> jerware, how would you know?
[17:26:18] <jerware> char buff[25]; memset(buff,0,sizeof(buff)); Serial.readBytes(buff, sizeof(buff)) // <---- Cant read from Serial. Serial.readBytes() returns 0. I'm sending it data from my computer
[17:26:40] <jerware> both sides have a baud rate set to 9600
[17:46:23] <LeoNerd> Balls. I don't have any 1M 0603s
[17:46:25] <LeoNerd> :(
[17:47:49] <Tom_itx> i got one of those cheap assortments off ebay for such occasions
[17:48:16] <_methods> old motherboard
[17:48:18] <_methods> hehe
[17:49:19] <LeoNerd> Mmm.. yeah, I only need one. just one on this board
[17:49:29] <LeoNerd> It's a weak pulldown for the analog read chain of the buttons
[17:50:11] <Tom_itx> adjust your analog readout and use something else
[17:50:40] <LeoNerd> Hm? it's the pulldown for holding the line at ~0V when no button is pressed
[17:51:01] <Tom_itx> so use something eles
[17:51:30] <Tom_itx> it will take a bit more to pull it off 0v so you can adjust your adc numbers
[17:52:44] <LeoNerd> Well, the biggest I have is 10k
[17:52:58] <LeoNerd> So that's like... 100 times off
[17:53:01] <Tom_itx> tryin to make it hard on yourself?
[17:53:27] <_methods> solder a through hole on the pads lol
[17:53:59] <LeoNerd> Hah! You're suggesting I put a 1/4W TTH resistor onto 0603 pads?
[17:54:14] <Tom_itx> you can do it
[17:54:18] <_methods> i'm crazy like that
[17:54:48] <Tom_itx> then every time you see that bigass resistor there you'll remember...
[17:54:48] <_methods> temporary of course heheh
[17:55:26] <jerware> Do the serial rx/tx pins need a pull up resistor if the dip package is on a bread board ?
[17:56:06] <LeoNerd> Tom_itx: Zeropunctuation has a wonderful phrase for that situation: "Sticks out like a pine-cone in a fruit-salad"
[17:56:49] <Tom_itx> heh
[17:58:13] <Lambda_Aurigae> jerware, no pullups needed...but if you connect it to the serial port on your computer you will need a level converter of some kind.
[17:58:37] <jerware> What's a level converter ?
[17:58:43] <Lambda_Aurigae> to convert the voltage levels.
[17:58:50] <Lambda_Aurigae> your AVR runs at 5V..or 3.3V...
[17:58:56] <jerware> 5v
[17:59:06] <Lambda_Aurigae> rs232 serial out of your computer is +/- 12 volts.
[17:59:22] <Lambda_Aurigae> a max232 or max233 chip will provide the voltage level conversion.
[17:59:44] <jerware> So I'm sending my arduino 12 volts?
[17:59:58] <Lambda_Aurigae> there are also usb-serial adapters that provide 5V.
[18:00:02] <Lambda_Aurigae> you didn't say arduino.
[18:00:12] <jerware> It's the atmega328p
[18:00:22] <Lambda_Aurigae> how do you connect the thing to the computer?
[18:00:31] <Lambda_Aurigae> an atmega328p is NOT an arduino...
[18:00:33] <jerware> I have a usb converter
[18:00:41] <Lambda_Aurigae> what kind of usb converter?
[18:00:51] <Lambda_Aurigae> a usb converter narrows it down to a couple hundred devices.
[18:01:41] <jerware> pl2303 converter
[18:01:50] <Lambda_Aurigae> many arduino boards do use the atmega328p chip but an atmega328p on a breadboard is not necessarily an arduino.
[18:02:31] <Lambda_Aurigae> ok...a pl2303 narrows it down to 3 different interfaces basically.
[18:02:38] <Lambda_Aurigae> what kind of plug is on the end opposite the USB?
[18:02:53] <jerware> RS232
[18:03:15] <Lambda_Aurigae> RS232 is not a kind of plug.
[18:03:28] <jerware> sorry, what do you mean by plug ?
[18:03:35] <Lambda_Aurigae> is it a db9? also known as a 9 pin dsub
[18:03:53] <Lambda_Aurigae> http://www.cooldrives.com/index.php/usbg-rs232-p36.html?fee=1&fep=983&utm_source=merchantcntr2014
[18:03:55] <jerware> yes db9
[18:03:57] <Lambda_Aurigae> look like that?
[18:03:58] <Lambda_Aurigae> ok.
[18:04:02] <jerware> http://www.google.com/imgres?imgurl=http://www.usconverters.com/images/rs232-pinout.jpg&imgrefurl=http://www.usconverters.com/index.php?main_page%3Dpage%26id%3D61&h=450&w=433&tbnid=kSCXwCgJPmERiM:&zoom=1&docid=7b4EjN__nrupdM&ei=DOnbVL3oFtenyAT33YLQCQ&tbm=isch&client=firefox-a&ved=0CDcQMygAMAA
[18:04:12] <Lambda_Aurigae> so that is going to need a level converter to talk to your atmega328p.
[18:04:21] <jerware> ok
[18:04:39] <jerware> what about atmega328p to atmega328p ?? Will I need pull ups ?
[18:04:52] <Lambda_Aurigae> no, you do not need pullups.
[18:05:31] <jerware> https://learn.sparkfun.com/tutorials/using-the-logic-level-converter
[18:05:33] <LeoNerd> You use a pull{up,down} if there's a time when the line would otherwise be floating, not driven by anything at all
[18:05:58] <jerware> well I'm sending serial data upon certain conditions.
[18:06:05] <jerware> from dip packge to dip package.
[18:06:09] <Lambda_Aurigae> jerware, no...that is a 5V to 3.3V level converter...not an rs232 to ttl level converter.
[18:06:31] <jerware> oh right. thanks
[18:06:37] <Lambda_Aurigae> rs232 talks different.
[18:07:06] <Lambda_Aurigae> normal TTL levels at 5V,,,logic 0 is 0V. Logic 1 is 5V.....(yes i know it's not quite full 5V but simplifying)
[18:07:06] <jerware> Is this why I'm getting garbage on gtkterm?
[18:07:41] <Lambda_Aurigae> for rs232 levels, 12V is logic 0 and -12V is logic 1...(again, the voltages can vary)
[18:08:11] <Lambda_Aurigae> wouldn't be surprised if you actually damage the atmega by feeding it directly from that adapter.
[18:08:55] <jerware> the atmega is still working. At least its other output pins.
[18:09:01] <Casper> damage is very likelly
[18:09:16] <Casper> but the protection diodes may save it, or not
[18:09:18] <jerware> I'll order a pack from amazon
[18:09:24] <Lambda_Aurigae> https://www.sparkfun.com/products/449
[18:09:39] <Lambda_Aurigae> there is your rs232 to ttl level converter.
[18:09:53] <jerware> Hey thanks alot man.
[18:18:11] <jerware> why is it when I probe the tx pin with the voltmeter, (the pack probe on gnd pin), I get a negative reading of -6.36 ?
[18:19:07] <Lambda_Aurigae> which tx pin?
[18:19:12] <Lambda_Aurigae> the one on the adapter?
[18:19:37] <Lambda_Aurigae> because, as I said, rs232 uses -V for logic 1 and +V for logic 0..
[18:19:54] <Lambda_Aurigae> -6V is within the current rs232 level spec for logic 1.
[18:19:57] <jerware> on the db9 jack
[18:20:06] <Lambda_Aurigae> originally it was -12 to -25 volts.
[18:20:10] <jerware> ahh
[18:20:22] <Lambda_Aurigae> rs232 logic is inverted.
[18:20:39] <Lambda_Aurigae> with a wider spread, using negative voltage and positive voltage rather than positive voltage and 0V
[18:22:12] <Lambda_Aurigae> http://en.wikipedia.org/wiki/RS-232
[18:22:15] <Lambda_Aurigae> good reading.
[18:22:37] <Lambda_Aurigae> http://en.wikipedia.org/wiki/MAX232 one of the most used rs232 to ttl level converter chips.
[18:23:57] <Lambda_Aurigae> I have a pile of max232 and max233 chips here. don't use them a lot anymore as I usually use a small microcontroller to play usb to ttl serial adapter.
[18:30:50] <jerware> would I use an osciliscope or logic analyzer to debug/decode a serial tx ?
[18:31:10] <jerware> tx as in rs232 signal
[18:35:02] <LeoNerd> You could do, sure
[18:40:48] <jerware> which tool?
[18:41:45] <Tom_itx> either one
[18:42:00] <Tom_itx> i lean toware logic analyzer
[18:42:06] <Tom_itx> toward*
[18:42:50] <LeoNerd> I don't in fact have a 'scope, I don't really do analog stuff.. at least not enough to really warant it. But I do have a nice 8ch logic probe
[18:43:23] <Tom_itx> i have both but can't remember the last time i had the scope out
[18:44:24] <Tom_itx> i had the logic analyzer out last night.
[18:45:05] <LeoNerd> My analyser practically lives on my desk these days
[18:45:18] <LeoNerd> It currently has all 8 hooks connected to my latest project
[19:12:40] <LeoNerd> Tom_itx, _methods: https://twitter.com/cpan_pevans/status/565674460020482049
[19:27:33] <_methods> hahahah
[19:27:35] <_methods> nice
[19:28:03] <_methods> +1 elex skillz
[19:28:16] <_methods> ghetto elex that is
[19:37:40] <Tom_itx> i didn't even notice it....
[19:37:42] <Tom_itx> :0
[19:38:22] <jadew> notice what?
[19:38:45] <Tom_itx> xactly.
[19:38:53] <Tom_itx> https://twitter.com/cpan_pevans/status/565674460020482049
[19:41:28] <jadew> lol
[19:42:06] <Lambda_Aurigae> yup..still looks the same...server not found.
[19:42:14] <jadew> twitter?
[19:42:28] <Lambda_Aurigae> but, I have twitter.com along with facebook.com redirected to 0.0.0.0
[19:42:43] <jadew> why?
[19:42:44] <Tom_itx> imagine a really nice picture you want to see really bad
[19:43:02] <jadew> Tom_itx, was about to provide one, but now there's no need
[19:43:06] <Lambda_Aurigae> because I consider both of those along with a bunch of other social networking sites to be absolutely useless and a waste of bandwidth.
[19:43:20] <Tom_itx> yup
[19:43:49] <jadew> Lambda_Aurigae, cleavage selfie in the bathroom is never a waste of bandwidth
[19:43:54] <Lambda_Aurigae> linkedin amongst them.
[19:43:55] <_methods> hahah
[19:43:57] <_methods> amen
[19:44:06] <Tom_itx> that's even worse
[19:44:07] <Lambda_Aurigae> can get that from 4chan.
[19:44:18] <Lambda_Aurigae> or just watch my wifey in the bathroom.
[19:44:44] <jadew> shut up, you're lying
[19:45:02] <Lambda_Aurigae> nope..my wife has awesome cleavage.
[19:45:09] <Tom_itx> prove it?
[19:45:17] <jadew> pics or it didn't happen! :D
[19:45:19] <Tom_itx> heh
[19:45:40] <Lambda_Aurigae> dunno if I have any pics of her on this comp...
[19:45:41] <Tom_itx> you kinda walked into that one
[19:45:50] <Lambda_Aurigae> definitely no nude ones.
[19:46:34] * jadew has imaginary x-ray
[19:47:02] <jadew> I can assess cleavage through winter clothes!
[20:07:48] <tpw_rules> anybody successfully built simavr on osx? i'm having problems but it just is like "warning didn't build" instead of showing me ehy
[20:07:50] <tpw_rules> why
[20:32:51] <_methods> those guys at apple have a genius bar i think
[20:32:55] <_methods> lol
[20:54:19] <tpw_rules> _methods: that was so funny i forgot to laugh
[20:57:47] <_methods> hehe
[22:17:33] <jaggzt> with LUFA, is choosing between a ClassDriver or LowLevel demo a matter of preference?
[22:17:49] <jaggzt> what are the pros and cons?
[22:46:27] <jaggzt> :/