#avr | Logs for 2012-12-25

Back
[00:31:17] <nas_> merry christmas you filthy animals
[01:08:08] <rue_mohr> hahaha
[05:04:39] <darknite> believers in what, santa? :/
[05:05:00] <OndraSter> of course
[05:05:03] <OndraSter> HE IS REALL YOU KNOW
[05:06:29] <darknite> of course he is, there are photos
[09:34:57] <bluwhale> Hey, anyone here who can help me with my UART circuit. I've been struggling with it for hours. Thanks.
[09:39:47] <specing> bluwhale: we are not psychic
[09:40:20] <bluwhale> specing, Sorry, what do you mean? Should I just post my question?
[09:40:31] <bluwhale> I guess so, here goes:
[09:41:36] <bluwhale> So the problem I am experiencing, I believe, is because of my incorrect setup of the MAX232. It seems I am able to write to the COM port, but am unable to read from it.
[09:43:43] <bluwhale> This is the datasheet: http://www.ti.com/lit/ds/symlink/max232.pdf and this is the circuit diagram I am following: http://sodoityourself.com/wp-content/uploads/2007/02/circuit_232.jpg
[09:46:34] <specing> bluwhale: How do you know you can write?
[09:48:19] <bluwhale> specing, Well, ignoring the fact that my microcontroller is loaded with a program which should echo what I write, I connected PIN 12 and 11 on the MAX232 together. I thought that this would force echoing behaviour. This test was done without any connection to the microcontroller, of course.
[09:49:24] <specing> so you actually could read the value you wrote?
[09:49:51] <bluwhale> specing, Yes. If I loaded a program to my micrcontroller that only writes, it seems to work.
[09:50:08] <specing> so you can read and write from the computer side
[09:50:15] <specing> and only write from the uC side
[09:50:42] <specing> would that be accurate to your problem?
[09:51:00] <bluwhale> specing, Not exactly:
[09:52:02] <bluwhale> I can write from the micrcontroller. That's it. Once I connect PIN 16 and 15 to VCC ang GND respectively on the MAX232, I can no longer type inside the communication terminal on my PC.
[09:52:58] <bluwhale> If I disconnect VCC (PIN 16) and GND (PIN 15) I can write to the terminal and it echoes.
[09:53:23] <bluwhale> Sorry if I am unclear, please let me know what I can explain better.
[09:53:59] <specing> I don't understand how you are able to see stuff being echoed if the max232 is unpowered
[09:54:33] <bluwhale> I am not sure either. Perhaps the pins from the DB9 connector are connected when unpowered.
[09:54:46] <specing> or something is shorted
[09:55:18] <bluwhale> I can confirm that if I remove the micrcontroller and the MAX232, and simply connect the RX and TX pins of the DB9 connector, the echoing works.
[09:55:43] <specing> what if you keep the MAX232?
[09:55:59] <specing> and connect pins 12 & 11?
[09:56:11] <bluwhale> I'll try again to make sure I don't waste your time. One minute please.
[09:58:15] <bluwhale> BTW, I only have 3 wires from the DB9 connector connected to anything. I am drawing 5V from USB.
[09:58:26] <bluwhale> The three are TX, RX, and GND.
[10:00:08] <bluwhale> specing, Ok, I tried again. If I disconnect VCC, then the echoing works if I connect pins 12 and 11.
[10:00:46] <bluwhale> But if I disconnect pins 12 and 11, so nothing is connected to them, it works the same way.
[10:03:40] <specing> then I'd say something is shorted
[10:04:13] <specing> or it doesen't work and your terminal software does the echoing itself
[10:04:38] <bluwhale> Ok. Any idea where I should start looking? I'm experiencing the same problem in another circuit I built on a different breadboard.
[10:04:40] <specing> in either case
[10:04:44] <bluwhale> I am using Putty.
[10:04:46] <specing> set baud 50
[10:04:52] <bluwhale> Ok, will try.
[10:04:55] <specing> and use a led + resistor to see what is going on
[10:05:29] <bluwhale> Where should I put the LED + resistor?
[10:05:58] <specing> on the rx/tx lines
[10:06:10] <specing> to see what is going on on them
[10:06:19] <bluwhale> Ok, will try it and report back. That's a neat idea.
[10:07:44] <bluwhale> Thanks for your help :)
[11:38:25] <bluwhale> specing, It's working now! But I don't know why. That's the worst solution possible.
[11:39:39] <bluwhale> '
[12:26:06] <tzanger> What solution is that?
[12:27:58] <bluwhale> tzanger, That's the problem. I don't know the solution. It works, but I don't know how after spending all this time.
[12:30:03] <tzanger> No, what was the issue and what did you do to fix it?
[12:31:02] <bluwhale> tzanger, I was having issues with the microcontroller's UART, and suspected there was some problem with the MAX232. I am not certain about what fixed it.
[12:31:08] <bluwhale> Unfortunately.
[12:31:38] <bluwhale> I rewired everything on a different breadboard in exactly the same way. And did it again on the old breadboard. It worked on both.
[12:35:56] <tzanger> Ah
[12:36:53] <Tom_itx> breadboards can be flakey
[12:36:56] <Tom_itx> i bet that was it
[12:37:00] <tzanger> That's common with breadboards. I loved them.
[12:37:22] <bluwhale> Really?
[12:37:32] <tzanger> Yes
[12:37:38] <bluwhale> Hmm alright, I guess I'll have to consider that in the future.
[12:37:43] <bluwhale> You live and learn.
[12:37:49] <tzanger> They are quick but they are notorious for being flaky. Especially as they age
[12:37:50] <Tom_itx> yeah you should
[12:38:12] <bluwhale> Thanks for your help fellas
[12:38:18] <tzanger> No problem
[12:40:22] <specing> you mean protoboards?
[12:40:29] <specing> aka solderless breadboard
[12:40:30] <Horologium> solderless breadboards...
[12:40:41] <specing> that is referred to as a protoboard
[12:41:02] <specing> breadboard means the holed sheet that you solder to
[12:41:06] <Horologium> the terminals don't make contact so well as they age....and they have some fun capacitive features that screw with RF type signals too.
[12:41:13] <Horologium> gotta love em!
[12:52:15] <tzanger> specing: I think it's regional. Breadboard always meant the solderless variety here. The holed board to solder was called vectorboard
[13:03:13] <bluwhale> Over here, breadboard means the solderless kind. Protoboard means the holed one which you solder.
[13:37:31] <MoL0ToV> someone can help? http://arduino.cc/forum/index.php/topic,138968.0.html
[13:43:05] <Horologium> help you with what MoL0ToV ?
[13:43:44] <MoL0ToV> i'm trying to program arduino with avr mkII usb programmer, but don't work
[13:43:57] <MoL0ToV> if you read the forum post you can understand
[13:44:13] <Horologium> with what programmer software?
[13:44:32] <Horologium> if I wanted to read forum posts I would hang out on forums.
[13:44:44] <Tom_itx> :O
[13:48:22] <tzanger> Horologium: If you have a specific question about the forum instructions, feel free to ask. I you'd like someone to hold your hand, you may have more help elsewhere.
[13:48:59] <Horologium> tzanger, I'm not the one asking for help.
[13:49:29] <tzanger> Lol, too much eggnog here I suppose
[13:49:33] <tzanger> My apologies
[13:50:48] <Horologium> no worries.
[13:51:01] <Horologium> not enough eggnog here.
[13:51:09] <Horologium> not making any till thursday myself.
[13:51:22] <Horologium> and then no alcohol for me....mores the pity.
[13:53:08] <Tom_itx> Horologium why are you causing trouble in the channel?
[13:53:10] <Tom_itx> :D
[13:53:23] <Horologium> it's my job.
[13:53:24] <Tom_itx> don't upset the drunks
[13:53:42] <Horologium> and because my doc says alcohol could kill me.
[13:53:59] <Horologium> because I have to take rat poison to keep my veins from clogging with bloodclots.
[13:54:01] <Tom_itx> guns can too
[13:54:10] <Horologium> alcohol is more likely to, however.
[13:54:18] <Tom_itx> pepole do the killnig
[13:54:31] <Horologium> something about bleeding out through my stomach, doncha know.
[13:54:48] <Tom_itx> yeah i don't touch it either
[13:56:23] <Tom_itx> got about 20 boards done yesterday
[14:00:11] <soul-d> destroyed one :P or at least the cmos cam hot air wasn't such a good idea :P
[14:00:18] <soul-d> package was melting
[14:01:11] <Tom_itx> oops
[14:01:16] <Tom_itx> i got 2 giving me grief
[14:01:18] <soul-d> well doesn't blow up connected but doesn't do much yet and i probably hooked power up wrong at least once so still
[14:01:33] <Tom_itx> i'll hook up the analizer to em sometime
[14:02:00] <soul-d> power looks normal but havent measured current drawn or stuff doessn't respond yet on just a clock
[14:02:15] <Tom_itx> i just set these aside for a while
[14:03:33] <soul-d> also good idea usally if their nagging
[14:05:12] <Horologium> MoL0ToV, as for your problem, do you have an ISP header on that arduino board?
[14:05:39] <Tom_itx> i think most of them do
[14:05:42] <Horologium> because the avr isp mkII won't work through the regular arduino programming/com port.
[14:05:58] <MoL0ToV> yes
[14:06:09] <MoL0ToV> on the arduino i have a icsp header
[14:06:11] <Tom_itx> make sure the pinout is right
[14:06:25] <MoL0ToV> when i connect the arduino to mkII
[14:06:38] <MoL0ToV> the led in the mkII from red become green
[14:06:41] <Tom_itx> mine works fine on my arduino
[14:06:43] <MoL0ToV> is right?
[14:06:57] <Tom_itx> if you like green it is
[14:07:02] <Tom_itx> tells me nothing
[14:07:51] <MoL0ToV> i never used this programmer
[14:08:12] <MoL0ToV> but when i connected to avr studio on windows avr studio has updated the mkII firmware
[14:08:30] <MoL0ToV> is possible that latest firmware for mkII don't work with arduino?
[14:08:45] <Tom_itx> has nothing to do with that
[14:09:02] <Tom_itx> are you using the arduino environment to program with?
[14:09:28] <Horologium> this is one of the reasons I don't like the whole ardweeny thing.
[14:09:43] <Tom_itx> me either but i have a 2560
[14:10:04] <Tom_itx> cause i couldn't make one for what ebay gave it to me for
[14:10:27] <MoL0ToV> yes i'm using arduino ide
[14:10:41] <Tom_itx> are you using windows or linux?
[14:12:00] <Horologium> we did a bunch of blinky light thingies with attiny45 chips a couple weeks back and some guy was there with his arduino and kept saying he could do everything we could do only better.
[14:12:16] <OndraSter_> lolwut
[14:12:18] <Tom_itx> uh huh
[14:12:27] <darknite> Horologium: that shows a deep understanding what avr (and arduino) is :D
[14:12:53] <Tom_itx> without one, the other would not be
[14:12:56] <Horologium> we deadbug wired attiny chips to LEDs with batteries and stuffed them into glass christmas tree bulb ornaments.
[14:13:03] <Horologium> and dared him to match that..
[14:13:16] <darknite> haha
[14:13:50] <Horologium> even setup a touch interface...single cap touch laid on the top edge of the bulb..
[14:14:02] <Horologium> for on/flash/color change/off
[14:14:11] <MoL0ToV> avrdude: Device signature = 0x00ffff
[14:14:11] <MoL0ToV> avrdude: Expected signature for ATMEGA328P is 1E 95 0F
[14:14:11] <MoL0ToV> Double check chip, or use -F to override this check.
[14:14:23] <MoL0ToV> if i invert the header:
[14:15:10] <MoL0ToV> avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Target reverse inserted
[14:15:55] <Horologium> so, it's not talking to the chip properly...the pinouts match on the header and the programmer?
[14:16:01] <Tom_itx> are you using windows or linux?
[14:16:09] <Tom_itx> u never answered me
[14:16:13] <MoL0ToV> linux
[14:16:26] <MoL0ToV> but on windows is the same, already tryed yesterday
[14:16:33] <Tom_itx> is it a 328p?
[14:17:07] <Horologium> almost looks like there is no power to the chip actually.
[14:17:10] <Tom_itx> avrdude -c avrisp2 -p m328p -P usb -U flash:w:"/usr/local/avr/yourfile.hex":a -e
[14:17:26] <MoL0ToV> i try with -F
[14:17:36] <Tom_itx> try with avrdude
[14:17:44] <MoL0ToV> here the command
[14:17:47] <MoL0ToV> /opt/arduino-1.0.3/hardware/tools/avrdude -C/opt/arduino-1.0.3/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -cstk500v2 -Pusb -Uflash:w:/tmp/build3161529095030873593.tmp/Blink.cpp.hex:i
[14:18:41] <Horologium> I didn't know the avrisp2 used the stk500v2 protocol.
[14:18:42] <Horologium> hmm.
[14:20:30] <Tom_itx> it pisses me off that arduino hides the hex file from you too
[14:20:44] <Tom_itx> and erases it when the session terminates
[14:21:09] <specing> it erases it? :O
[14:21:14] <Tom_itx> yep
[14:21:32] <Tom_itx> unless you get there first :D
[14:21:48] <specing> well I've never used arduino so ... :D
[14:22:01] <Tom_itx> i haven't used them much
[14:22:02] <MoL0ToV> it's not a problem
[14:22:16] <Tom_itx> i got the 2560 for reprap or cnc stuff to play around
[14:22:16] <specing> its rubbish
[14:22:18] <Horologium> I tried it once,,programmed a chip with the arduino bootloader and played with the IDE...it sucked.
[14:22:23] <Tom_itx> specing i agree
[14:22:36] <Tom_itx> i bet he never tried my suggestion
[14:22:42] <Horologium> I'm better off with vi and make
[14:23:00] <specing> actually I looked into it but quickly found it wasn't compatible with my urge to overoptimize everything
[14:23:05] <darknite> if you know what you're doing with computers in general then ino is a much nicer suite for arduino
[14:23:12] <Horologium> optimize? arduino?
[14:23:59] <specing> now Im coding on the stellaris
[14:24:06] <specing> TI's library is crap
[14:24:07] <specing> :D
[14:24:58] <darknite> heh, i have a couple of msp kits sitting here
[14:25:16] <Horologium> darknite, same here...played with them then turned back to avr and pic.
[14:25:32] <Horologium> been futzing with some renesas boards lately but they are even worse.
[14:25:55] <Horologium> gave most of my msp430 stuff to the local hackerspace last week.\
[14:27:35] <Horologium> right now I have an atmega1284p on the breadboard with a maxim rtc chip, some buttons, and a 16x2 lcd, working on menus for an automated chicken door controller.
[14:28:09] <Horologium> will probably pare it down to an atmega16 in the end.
[14:28:39] <darknite> nice, my current project is a 328p with rfid reader, rtc and sd card (for data logging) for attendance tracking at our martial arts club
[14:31:48] <Horologium> love maxim free samples.
[14:31:57] <Horologium> ds1306+
[14:32:02] <Horologium> dual alarm rtc chip.
[14:32:20] <Horologium> can set the alarms for sunup and just after sundown..then only have to change them every week or so..
[14:32:33] <Horologium> which I'm programming so it can be done from the front panel with 3 buttons.
[14:32:51] <specing> well
[14:33:07] <specing> the stellaris has 13 RTC's aboard...
[14:33:21] <Horologium> and costs more than these chips do I have I'm sure.
[14:33:34] <Horologium> as I got the mega16 and the rtc chips as free samples.
[14:34:43] <Horologium> hmm...might even go down to an atmega8...think that will have enough i/o for this project.
[14:34:53] <Tom_itx> get an 88 instead
[14:34:57] <Tom_itx> cheaper with more features
[14:34:59] <Tom_itx> same pinout
[14:35:03] <Horologium> I have a stack of atmega8 chips here.
[14:35:15] <Horologium> and don't really need advanced features.
[14:35:43] <Horologium> 1 pin for motor, 2 for door location sensors, 7 for LCD, 3 for RTC, and 3 for buttons.
[14:35:45] <darknite> i never ordered a stellaris when they were $5, at $13 it kind of feels more relevant to get an rpi
[14:37:29] <Horologium> doing up a simple menu system...one button cycles through the features....time hour, time min, alarm1 hour, alarm1 min, alarm2 hour, alarm2 min, up/down.
[14:37:50] <Horologium> the other buttons will increment or decrement the selection.....up/down would be a force up or down of the door.
[14:38:58] <Horologium> with no touch for a couple of minutes it will switch automatically to up/down mode....that way we can just walk out and hit the open or close button if necessary.
[14:39:35] <Horologium> motor drive is a 1ms to 2ms pulse fed out to a continuous rotation servo.
[14:40:21] <Horologium> servo drives a worm drive and major downgearing so it can lift or raise the door slowly.
[14:41:19] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/logger/logger_menu.jpg
[14:41:20] <darknite> cool
[14:42:10] <Horologium> door has a gravity lock....when the rope is fully lowered the door settles to the bottom and a weight settles between two cam locks that push out to the side to lock the door in place.
[14:42:23] <Horologium> so door can't be lifted manually, only by lifting by the rope.
[14:42:48] <Horologium> Tom_itx, similar but I'm dropping by one button.
[16:10:39] <Tom_itx> Horologium, i actually kinda like the way they did the menu system in marlin reprap software
[16:10:52] <Tom_itx> they used a manual encoder with a pushbutton on it
[16:11:11] <Tom_itx> like 15 cpr or such
[16:11:22] <Tom_itx> rotary switch sortof thing
[16:19:33] <soul-d> like those with 2bit grey code output
[16:19:48] <Tom_itx> yup
[16:20:47] <soul-d> still got few cheap ones from china to use for such things
[16:22:29] <Tom_itx> http://www.mouser.com/ProductDetail/ALPS/EC11E15244B2/?qs=%2fha2pyFadugMG2RDp45gzKy3E%252bJw2bg9wyx%252blVW1GEpKn%2fqxa66ihw%3d%3d
[16:22:53] <soul-d> http://www.sureelectronics.net/goods.php?id=221
[16:23:15] <soul-d> is ones i got
[16:23:58] <Horologium> mine come from car radios
[16:24:10] <Horologium> I like cheap/free stuff after all.
[16:24:17] <Tom_itx> i was gonna resort to that but i had to order from mouser anyway
[16:24:56] <Tom_itx> anyway.. time to go for dinner
[16:24:56] <Horologium> local junk yard just trashes radios usually.
[16:25:59] <soul-d> have a nice one
[18:13:16] <specing> http://sourceware.org/binutils/docs-2.23.1/as/AVR-Opcodes.html#AVR-Opcodes
[18:13:19] <specing> jewel.
[20:09:15] <Essobi> Happy Holidays. Herp.