#avr | Logs for 2015-02-25

Back
[13:17:49] <EI24> Hi, i learned that assembly code is first converted into hex code, and that you could in principle upload hex to your controller instead of using assembly. Maybe i got some details wrong of how this works, but if you can program in hex code instead of assembly, how much diffrence are there?
[13:18:49] <EI24> is it much harder? is it just a matter of using hex instead of assembly keywords?
[13:30:09] <Mr_Sheesh> EI24 - hex is a lot more annoying, you'd have to do a lot more lookups and math to do that; All your variable addresses and jump offsets you get to calculate by hand, instead of the assembler doing it for you; and checksums too iirc. Assembler is far more pleasant to deal with, also, allws comments so, 3 months later when you want to add something, you don't rip out ALL your hair...
[13:35:42] <EI24> haha
[13:38:38] <EI24> ok, seems bothersome. But from what i understands assembly is like machine language just that everything translated into words. For example say 1000 0110 is a instruction in binaryce o, maybe in assembly it is ADD(1000) R1(01) R2(10). So is not the diffrence only that you have put words to everything?
[13:40:34] <Mr_Sheesh> Words really help quite a bit, for when you come back later to improve something. Its just plain the way to go, you can get to where you can read hex code but asm is easier
[13:41:05] <EI24> yes thats certainly true x)
[13:42:39] <EI24> thanks for answering!
[13:43:01] <Mr_Sheesh> NP :) YVW
[18:27:27] <hje841> getting down to the bare bones on the Arduino Duemilenova (2009 version of the Arduino) the schematics http://arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf is a bit confusing about the connection between the FT232RL and the Atmega328p
[18:28:42] <hje841> Do you know if it is done as on page 30 on http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf ?
[18:48:19] <Lambda_Aurigae> what is confusing?
[18:48:51] <Lambda_Aurigae> ft232 txd is connected to the rxd on the mega8
[18:49:02] <Lambda_Aurigae> ft232 rxd is connected to the txd on the mega8
[18:49:23] <Lambda_Aurigae> rts is connected to the reset line through a resistor
[18:49:31] <Lambda_Aurigae> dtr is connected to reset through a capacitor.
[18:49:47] <Lambda_Aurigae> it is very straightforward.
[18:51:17] <Lambda_Aurigae> the rts is likely used to reset the chip and bring it into programming mode...or maybe the dtr..not really sure which.
[18:53:37] <hje841> Lambda_Aurigae, you are right. I'm sooo tired right. too tired to see that. Thanks. I had myself focused on the X3 connecter on the Arduino schematics :S and that's completely irrelevant
[18:53:50] <Lambda_Aurigae> http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection
[18:53:56] <Lambda_Aurigae> explains the reset circuitry.
[18:54:29] <Lambda_Aurigae> x3 is just there for additional comms through the serial communications.
[18:54:35] <hje841> thanks
[18:54:39] <Lambda_Aurigae> you can use those lines for returning data in other ways.
[18:57:00] <hje841> got it. for now my main goal is to establish a serial link between the Atmega328p and my laptop through USB and the FTDI chip
[18:58:37] <Lambda_Aurigae> that's what the ftdi chip does.
[18:58:56] <Lambda_Aurigae> simple serial interface..you just use the usart on the microcontroller to talk to it.
[19:01:44] <hje841> so you just set the parity, packet size and start/stop bits in your serial terminal? like minicom and it should be recognized on the mega8 side?
[19:07:53] <Lambda_Aurigae> 9600-8n1
[19:08:12] <Lambda_Aurigae> or,,,,look at your ardweeny docs and it will tell you everything you need to know.
[19:08:33] <Lambda_Aurigae> on the mega8 side you have to actually write code to talk via the usart.
[19:08:54] <Lambda_Aurigae> as I recall, the ardweeny system has simple usart setup and all if you are using their libs...
[19:09:03] <Lambda_Aurigae> never actually used one myself.
[19:09:10] <hje841> Thanks.
[19:09:32] <Lambda_Aurigae> played with the software once...found the IDE horrid and the libs to be just flippin insane overbloated.
[19:10:11] <hje841> I started with the Arduino IDE and bootloader. but now I'm diving into the barebones Atmega328p
[19:10:14] <hje841> much more fun
[19:10:35] <Lambda_Aurigae> I started barebones AVR with assembly then moved on to C...
[19:10:43] <Lambda_Aurigae> do it all command line in linux.
[19:11:03] <hje841> I haven't looked into the library code, but I can imagine that it's rather bloated to handle all sorts of corner cases
[19:12:50] <Lambda_Aurigae> http://pastebin.com/dSRSxgax I didn't do this one but someone in here did...a little comparison of native setting an output and doing it with ardweeny libs.
[19:13:24] <hje841> I've been working with PIC and MSP430 barebones for my CompEng studies. AVR on my own time
[19:14:18] <hje841> wow, that's insane
[19:14:19] <Lambda_Aurigae> msp430 hasn't impressed me yet. I do work with pic18 and pic32 on occasion...and a lot of 8052 stuff lately along with AVR....all hobby stuff for me although I do teach kids electronics and microcontrollers in the summer.
[19:15:48] <Lambda_Aurigae> I think this summer we are going to build laser tag bots that hunt for "food"(batteries) and fight for resources.
[19:16:21] <Lambda_Aurigae> gotta get some ultracaps though.
[19:17:15] <hje841> we fried a couple of uCs while trying to control a solenoid. reverse diods are indeed needed..
[19:17:23] <Lambda_Aurigae> hehe.
[19:17:30] <Lambda_Aurigae> that's what driver chips are for!
[19:17:33] <hje841> oh. that sounds like an awesome course.
[19:17:39] <Lambda_Aurigae> it's not a course.
[19:17:47] <Lambda_Aurigae> just me teaching random kids from the area.
[19:17:48] <hje841> erhm... what driver?
[19:17:56] <Lambda_Aurigae> depends on what you are driving.
[19:18:06] <Lambda_Aurigae> allegro-micro makes lots of h-bridge and half-h-bridge chips.
[19:18:23] <Lambda_Aurigae> uln2308 works well too for a lot of things.
[19:18:46] <hje841> I think we only had one or two transistors as a switch for that solenoid
[19:19:14] <Lambda_Aurigae> aahh, yeah...need the diode if you just use a transistor.
[19:19:24] <Lambda_Aurigae> should always have it anyhow, just for snots-n-giggles.
[19:19:59] <hje841> I do it all the time when driving a relay, and I forgot that a solenoid is kind of the same
[19:20:07] <Lambda_Aurigae> exactly the same.
[19:20:13] <hje841> right
[19:20:16] <Lambda_Aurigae> just a coil of wire with an iron core.
[19:20:18] <Lambda_Aurigae> nice back emf!
[19:20:48] <Lambda_Aurigae> you cut off power and the collapsing magnetic field generates one hell of a pulse.
[19:21:09] <Lambda_Aurigae> have seen them generate dozens and in one case, a couple of hundred volts.
[19:21:10] <hje841> I believe we measured it to 70V
[19:21:32] <hje841> that'll fry any uC close by
[19:21:38] <wulax> Lambda_Aurigae: how will you aim the bots and find batteries, will they be remote controlled or automated with computer vision libraries, or something else?
[19:22:00] <Lambda_Aurigae> fully self-contained automated is the ultimate goal I'm looking at.
[19:22:15] <Lambda_Aurigae> using flashing beacons for different resources.
[19:22:30] <Lambda_Aurigae> directional beams done with LEDs.
[19:22:46] <Lambda_Aurigae> challenge/response stuff...pulse your beam, look for beacon return.
[19:23:23] <Lambda_Aurigae> when you pulse your beam your head pulses and others looking in your direction might see you and start hunting you.
[19:23:26] <wulax> ok, sounds like a very cool project
[19:23:26] <Lambda_Aurigae> that kind of thing.
[19:23:40] <wulax> especially if you teach kids in the mean time
[19:23:54] <Lambda_Aurigae> a level of artifical stupid easily put in an atmega1284p
[19:23:56] <Lambda_Aurigae> yup.
[19:24:01] <Lambda_Aurigae> half the fun is teaching.
[19:24:38] <Lambda_Aurigae> I have a ready supply of most of the parts I need..boss lets me rip motors and electronics out of old dead copiers before they go to the scrap yard.
[19:26:24] <tpw_rules> oh dear how far away should i stay
[19:26:37] <tpw_rules> is this supposed to be like that turtle project?
[19:26:39] <Lambda_Aurigae> how far away from what?
[19:26:46] <tpw_rules> from your evil robot empire
[19:26:49] <Lambda_Aurigae> hehe.
[19:26:55] <Lambda_Aurigae> we will take over the entire WORLD!
[19:27:01] <tpw_rules> VURLD*
[19:27:03] <Lambda_Aurigae> skynet here we go!
[19:27:14] <tpw_rules> do copiers have servos?
[19:27:24] <tpw_rules> i thought it was all stepper motors, with encoders if you're lucly
[19:27:25] <hje841> we're close to Skynet. Linux just hit v4.0
[19:27:26] <Lambda_Aurigae> no but they have lots of steppers.
[19:27:33] <Lambda_Aurigae> and solenoids
[19:27:43] <tpw_rules> make a jumping bot
[19:27:50] <Lambda_Aurigae> problem is they are all 24V
[19:28:03] <Lambda_Aurigae> some of the stuff runs ok at 12V, just not as much power.
[19:28:55] <Lambda_Aurigae> recently got a bunch of main drive motors that have a control board on them....with forward/reverse, +V, GND, on/off, and pulse return..
[19:29:12] <Lambda_Aurigae> they are brushless DC motors....basically super resolution steppers.
[19:29:39] <tpw_rules> ooh that's sexy
[19:29:40] <Lambda_Aurigae> when you turn them off they go into motor lock mode.
[19:29:56] <Lambda_Aurigae> basically shorting the windings.
[19:30:42] <Lambda_Aurigae> also getting some wormgear boxes lately..
[19:30:55] <Lambda_Aurigae> little DC motor in a box with worm drive and major reduction.
[19:31:24] <Lambda_Aurigae> they are used for lifting paper trays...the ones I pulled last friday will lift 4 reams of paper.
[19:32:28] <Lambda_Aurigae> and I have a big pile of driver boards....lots of motor control chips and mosfets.
[19:32:54] <hje841> btw, what kind of setup should I use for controlling my curtains ?
[19:33:11] <hje841> and now you're just showing off :D
[19:33:21] <Lambda_Aurigae> controlling curtains..
[19:33:23] <Lambda_Aurigae> hmmm.
[19:33:35] <Lambda_Aurigae> I've used car door electric window motors for that in the past.
[19:33:44] <Lambda_Aurigae> good heavy torque.
[19:35:20] <hje841> yeah, I might need a fair amount of torque. especially if I set it up with only one motor moving both sides
[19:36:28] <Lambda_Aurigae> just takes a good heavy driver chip for them.
[19:36:31] <Lambda_Aurigae> or,,,a relay.
[19:37:21] <hje841> I got a 4 channel relay board with opto isolators. That should do it
[19:37:44] <Lambda_Aurigae> so long as it can handle the current.
[19:37:58] <Lambda_Aurigae> those things can pull some heavy current..
[19:38:28] <Lambda_Aurigae> you might also look at the tray lift motors out of old copiers.
[19:38:48] <Lambda_Aurigae> not nearly so heavy duty but almost always wormgear driven and pretty decently built.
[19:39:12] <hje841> hmm.. I have no idea where I could get a hold on old copiers
[19:39:15] <Lambda_Aurigae> find a local copier repair shop and talk to the service manager...they might let you dig through their bone pile for little to nothing.
[19:39:30] <Lambda_Aurigae> or buy some of the old machines for scrap metal price.
[19:39:42] <hje841> I need to do that :)
[19:40:05] <Lambda_Aurigae> sharps have a standard gear box motor for like 8 different models that work great.
[19:40:11] <Lambda_Aurigae> 24V motor but it will run at 12V
[19:40:45] <Lambda_Aurigae> and it's a standard little DC motor which should be easily replaced with a 5V version of the same physical size that you can pull out of any of a dozen little toy cars and such.
[19:41:59] <hje841> could be nice to have something with a complete set of gears. might be easier to mount
[19:42:06] <Lambda_Aurigae> old inkjet printers usually have 2 steppers and lots of gears and stuff.
[19:42:40] <Lambda_Aurigae> yeah..it's a little box with a plug for the motor and a shaft out the side and some mounting holes.
[19:43:56] <hje841> what the .....? I can't reach youtube...
[19:44:44] <Lambda_Aurigae> aaawww.
[19:44:52] <Lambda_Aurigae> I prefer you not touch my tube anyhow.
[19:45:09] <hje841> I was following "Ask an Engineer" from Adafruit
[19:46:38] <hje841> oh well, I guess it's bedtime for my - 2:25 am here anyway
[19:46:52] <hje841> thanks for the pointers on the motors and the FTDI serial
[19:47:09] <Lambda_Aurigae> is almost bedtime here..
[19:47:13] <Lambda_Aurigae> 19:29
[19:47:54] <Lambda_Aurigae> gonna go take drugs and read some xanth for a while.
[19:48:07] <hje841> enjoy
[20:36:02] <ferdna> guys i got a schematic from a website but can't seem to remember where i got it from... http://i.imgur.com/0Qu1dxL.jpg
[20:38:24] <Tom_itx> looks kinda cheesy
[20:38:48] <Tom_itx> at least add an isp header
[20:39:19] <Tom_itx> and some pins for breakout
[20:39:39] <ferdna> hehehe, yeah...
[20:39:43] <ferdna> i sure will...
[20:39:51] <Tom_itx> was there a question there?
[20:39:58] <ferdna> yeah i need the website
[20:40:04] <Tom_itx> why?
[20:40:11] <Tom_itx> it's pretty self explanatory
[20:40:12] <ferdna> i need to download gerber files
[20:41:54] <Tom_itx> why not just redraw it?
[20:42:00] <Tom_itx> it's so basic..
[20:42:22] <ferdna> i just wanted to send gerbers to pcb factory and get them on the mail
[20:45:42] <Tom_itx> http://moderndevice.com/product/rbbb-kit/
[20:45:47] <Tom_itx> i did find that but not yours
[20:48:39] <ferdna> Tom_itx, thanks... but will really like to find that site... let me post another pic
[20:49:14] <ferdna> here:
[20:49:15] <ferdna> http://i.imgur.com/qtyBRoA.jpg
[20:52:30] <Tom_itx> i can't find it
[20:52:39] <ferdna> me neither
[20:52:40] <ferdna> :'(
[20:53:15] <Tom_itx> it would take less time to draw it than search
[20:54:00] <Tom_itx> my pc crashed and i don't have it all back yet or i'd do it for you
[20:54:21] <ferdna> Tom_itx, will you do it for me using kicad? i'll pay
[20:54:40] <Tom_itx> no
[20:54:42] <Tom_itx> i use eagle
[20:55:30] <Tom_itx> why do you want such a minimal board?
[20:55:50] <ferdna> to play... experiment... burn it... give it hell...
[20:55:59] <Tom_itx> no io pins?
[20:56:13] <Tom_itx> no ISP header?
[20:56:48] <ferdna> i need ICSP pins, mounting holes
[20:57:05] <ferdna> and 2 d io pins
[21:00:59] <Tom_itx> i have one but it uses the QFP part
[21:06:26] <ferdna> Tom_itx, that will take me longer to solder
[21:06:27] <ferdna> :/
[21:39:20] <tpw_rules> what do you guys use for designing PCBs
[21:46:45] <wulax> kicad, but I am a hobbyist.
[21:52:49] <Tom_itx> eagle
[21:59:32] <tpw_rules> is there any way in eagle to give nets two different names
[21:59:41] <tpw_rules> because two connectors on the same net have different pin names
[22:01:26] <Tom_itx> tpw_rules there is
[22:01:32] <Tom_itx> for like multiple gnds?
[22:01:47] <tpw_rules> no i mean on one connector it's SCK but on another connector it's CLOCK
[22:01:49] <Tom_itx> it's something like name@1 name@2 etc
[22:01:56] <Tom_itx> no
[22:02:01] <Tom_itx> you can't do that
[22:02:23] <tpw_rules> darn
[22:03:27] <tpw_rules> what should i do
[22:03:44] <Tom_itx> rename them one or the other
[22:03:54] <Tom_itx> you can join the nets
[22:03:59] <Tom_itx> and call it one resulting name
[22:04:04] <tpw_rules> well it's more disparate. that was just an example
[22:04:13] <tpw_rules> i'm using an attiny so each pin does like six things
[22:04:32] <Tom_itx> you better figure out which of the 6 is most important :D
[22:04:44] <tpw_rules> ugh
[22:05:16] <tpw_rules> what sort of bypass cap might i need
[22:05:39] <Tom_itx> for what?
[22:05:44] <Tom_itx> .1uf?
[22:05:48] <tpw_rules> for an attiny\
[22:05:56] <tpw_rules> at the end of a kind of a long cabe
[22:10:51] <tpw_rules> how do i change the size of a board
[22:11:14] <Tom_itx> ?
[22:11:18] <Tom_itx> move the outlines
[22:11:33] <Tom_itx> on dimension layer 20 iirc
[22:11:50] <Tom_itx> make it any shape you want
[22:12:12] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[22:12:17] <Tom_itx> like that for example
[22:14:39] <tpw_rules> "f/b annotation has been severed!"
[22:15:04] <Tom_itx> you edited the board with the schematic closed
[22:15:06] <Tom_itx> shame on you
[22:15:12] <tpw_rules> but i didn't
[22:15:19] <tpw_rules> all i did was redraw the dimensions
[22:15:24] <Tom_itx> roll back to a saved ver
[22:15:31] <Tom_itx> they're named with numbers
[22:15:33] <tpw_rules> it happened right after i saved and then went away
[22:15:34] <Tom_itx> in the dir
[22:15:52] <Tom_itx> find the same numberd board sch and rename them
[22:15:57] <tpw_rules> if it disappeared did it fix itself?
[22:16:03] <Tom_itx> huh?
[22:16:23] <tpw_rules> it said that only for a second, then it disappeared
[22:16:26] <Tom_itx> i've had to roll back once in a while
[22:16:33] <Tom_itx> i dunno
[22:17:40] <tpw_rules> hm i need to figure out what capacitors i'm actually going to use
[22:17:56] <Tom_itx> ok tell ferdna i got his/her board done
[22:19:29] <Tom_itx> it's about 1.5 x 2.1"
[22:19:41] <Tom_itx> arduino bare minimum
[22:19:49] <Tom_itx> http://i.imgur.com/0Qu1dxL.jpg
[22:20:04] <Tom_itx> i added headers and an ISP
[22:24:43] <tpw_rules> how do i do like ground planes and such
[22:24:55] <tpw_rules> http://cl.ly/image/1b1j3f2W0V3P i just autorouted it
[22:25:07] <Tom_itx> umm
[22:25:42] <Tom_itx> polygon...
[22:25:47] <Tom_itx> draw.. polygon..
[22:25:55] <Tom_itx> define it on a signal like GND
[22:25:56] <tpw_rules> i mean like conceptually
[22:26:08] <Tom_itx> oh
[22:26:18] <Tom_itx> thoughtfully
[22:27:06] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/avr/arduino/arduino_bare_min_brd.png
[22:27:16] <Tom_itx> pretty close to his
[22:27:44] <Tom_itx> http://i.imgur.com/0Qu1dxL.jpg
[22:29:22] <tpw_rules> is the autorouter any good?
[22:29:29] <Tom_itx> i don't use it
[22:29:40] <Tom_itx> no autorouter is very good
[22:30:08] <Tom_itx> pretty hard to duplicate the human brain with a machine
[22:30:28] <tpw_rules> do you ever use it as a starting off point?
[22:30:39] <Tom_itx> no not usually
[22:30:53] <Tom_itx> i try to group the parts on the schematic
[22:30:58] <Tom_itx> like the psu part
[22:31:01] <Tom_itx> etc
[22:31:25] <Tom_itx> and sometimes i move signals around to make the board routing easier
[22:31:39] <Tom_itx> like if you have a part with multiple gates on it
[22:31:48] <tpw_rules> yeah that's what i've been doing
[22:31:50] <Tom_itx> find the best routing combination
[22:32:10] <Tom_itx> some are just pure shit no mater how you look at it
[22:32:49] <tpw_rules> i don't know best practice for laying down copper though
[22:36:56] <Tom_itx> i'm no expert either
[22:37:14] <tpw_rules> well you've done it > 0 times
[22:37:53] <Tom_itx> get it ready and post it and let ppl see so you can make correcions before you spend money on it
[22:38:41] <Tom_itx> i could make that board smaller but i was copying his layout
[22:39:01] <tpw_rules> the two non icsp connectors could be whatever pinout i wanted
[22:39:17] <tpw_rules> maybe i'll lay out the rest of the board then decide their pinout
[22:44:17] <ferdna> Tom_itx, it looks awesome...
[22:55:25] <inflex> lo folks
[22:55:27] <inflex> hi Tom_itx
[23:02:47] <Tom_itx> hi inflex
[23:02:53] <Tom_itx> off to sleep now..
[23:07:37] <ferdna> Tom_itx, gn