#avr | Logs for 2012-03-20

Back
[00:00:22] <skorket> I have written a button test program (source: http://pastebin.com/Gb44FguJ ) for an ATMega328 that appears to work ok in isolation, but when I start truning on a row from an attached led matrix, the output led attached to the 328 flashes and sometimes goes into an 'on' state, even when the button is not pressed.
[00:01:41] <skorket> PB0 is used for input via 1k pullup and attached to normally open button. An indicator light is attached to PC0 to turn on when the button has been pressed for more than 100ms.
[00:02:24] <Casper> skorket: do you have a schematics?
[00:02:29] <Casper> also
[00:02:33] <Casper> remember that button bounce
[00:02:50] <Casper> so you need to debounce in software or hardware
[00:03:02] <atarax> hmm, that doesn't use the qtouch library either
[00:03:24] <skorket> Casper, let me try and get a schematic real quick. I'm doing software debouncing. I'm making sure 100ms has passed in which PB0 is 0V before counting it as a press
[00:03:54] <atarax> I was planning to make a business card with a touch tic-tac-toe game, but I think i'm in way over my head
[00:04:02] <Casper> do you have decoupling capacitor across the avr supply pin?
[00:04:55] <skorket> Casper, I do not. Is that absolutely necessary?
[00:05:03] <Casper> almost
[00:05:15] <Casper> avr being cmos based... it'S full of fet
[00:05:26] <Casper> to charge a fet gate, it need huge current
[00:05:56] <Casper> that high surge can make the supply drop quite alot if there is any resistance or inductance on the lines
[00:06:04] <Casper> the capacitor fix the issue
[00:06:27] <Casper> try a 0.01 to 0.1uF ceramic capacitor physically as close as possible to the power pins
[00:07:48] <Landon> sounds like a pretty expensive business card :P
[00:08:34] <atarax> Landon: It came out to something like $20 apiece if I make 25 of them
[00:08:43] <Kevin`> Landon: more than paper, but it's just an avr, 9 leds, and some source of power, no?
[00:09:13] <Landon> Kevin`: sure, but the AVR alone would drive it past $1/card?
[00:09:18] <atarax> Kevin`: 9 bicolor led's, 9 capacitors, 9 resistors, a battery, an AVR, and the board
[00:09:30] <atarax> Landon: actually the most expensive part, by far, is a printed PCB
[00:09:42] <skorket> Casper, ok, let me get that schematic, try the caps and I'll get back to you
[00:09:45] <Landon> wasn't even thinking of that, heh
[00:09:56] <Casper> I'm going bed
[00:10:02] <atarax> I'm still working on making my own PCB's
[00:10:13] <Landon> dead bug business card :D
[00:10:32] <Kevin`> Landon: still, ordering from china you can probably get the entire set for $50
[00:10:34] <atarax> It's ironic, I think the most expensive thing I've gotten in a long time is a free soldering iron
[00:10:46] <Kevin`> Landon: of the pcbs just, that is
[00:10:59] <atarax> Kevin`: not if you want 25
[00:11:17] <atarax> if I want to make 1000 cards, it comes down to something like $2 each
[00:11:37] <Kevin`> atarax: there are vendors that do fairly reasonable low volume production
[00:11:48] <atarax> well, maybe not $2 but much less than $20
[00:13:44] <atarax> I just wish I was more creative so I could come up with something easier and cheaper than tic tac toe
[00:14:01] <atarax> the worst part is there's 9 spaces, which messes everything u
[00:14:05] <Kevin`> global thermonuclear war simulator
[00:14:15] <atarax> Simon might be better
[00:14:42] <atarax> only need 4 LED's, no colors
[00:15:07] <Kevin`> atarax: plus one audio transducer of some sort though
[00:15:22] <atarax> i don't need sound, but i could put a piezo buzzer on it
[00:15:34] <Kevin`> I wonder if you could make one using pcb tracks and/or capacitors
[00:15:57] <atarax> before I get that far I think I should make a stepper motor controller, I want to hook one up to my laminator so I can print PCB's in one pass
[00:27:57] <skorket> Casper, here's the schematic: http://upverter.com/dorkusmonkey/c18624457adb6bba/button_test/ . It's a little incomplete with regards to the led matrix array, but maybe you get the idea. The 27pf caps for the crystal are actually 30pf. The atmega168 is actually an atmega328. Upverter doesn't have those parts yet so I need to add them in. I'll do it, but for now, I hope it isn't too confusing.
[00:28:09] <skorket> Let me do the decoupling cap test now...
[00:29:09] <atarax> what did you make that schematic with? I'm getting tired of eagle
[00:30:11] <skorket> atarx, Upverter, it's an online editor. It still has a lot of quirks but it's getting there
[00:30:16] <skorket> *atarax
[00:31:05] <atarax> does it make PCB layouts?
[00:31:26] <atarax> "coming soon"
[00:32:01] <skorket> yeah, not that I know of. It's really in it's infancy right now but I'm sure they have plans on the horizon for it
[00:32:08] <skorket> so, no, probably
[00:32:17] <CapnKernel> More lock-you-in proprietary software :-(
[00:32:35] <CapnKernel> atarax: Hi there
[00:32:59] <CapnKernel> I can do affordable PCBs for you. Several people in #avr have used my services.
[00:33:22] <skorket> CapnKernel, I don't know. It's not like they're releasing their source code but they're GPL friendly (as in they provide nice default options for open licenses for you schematics) and they have an export function...
[00:33:29] <skorket> check it out and see...
[00:34:38] <CapnKernel> For example, cyanide, Sgt_Lemming, Tom_itx and Alexer
[00:35:51] <atarax> CapnKernel: The more I work on this, I realize i'm further away from being ready to actually make PCB's
[00:36:11] <CapnKernel> Haha, we've all been there
[00:36:19] <CapnKernel> Still, nice to know you have the option.
[00:36:48] <atarax> CapnKernel: I was going to buy a battery from digikey today and I couldn't even get that
[00:37:07] <CapnKernel> Yeah, it happens
[00:37:27] <CapnKernel> Well, when you're ready with your PCBs, give me a buzz right here. I'll give you a quote and you'll be very surprised.
[00:38:37] <skorket> CapnKernel, what are you prices like?
[00:38:56] <skorket> Casper, I just tried putting some caps on and I can't repeat the bug...
[00:39:32] <skorket> Casper, you think it was a power draw issue? I looked at the voltage on the power line and it seemed clean, though my oscilloscope isn't very fast...
[00:40:13] <CapnKernel> skorket: Well I think they're good, but then again, I would, wouldn't I? :-)
[00:40:57] <Casper> skorket: you're looking at some extremmely quick events, you might not see it on the scope
[00:41:00] <skorket> CapnKernel, I understand if you don't want to just announce it to everyone, I was just wondering...a ballpark number
[00:41:04] <Casper> and yes it can be a power issue
[00:41:39] <atarax> for now I'm trying to get this laser printer pcb thing working
[00:43:18] <CapnKernel> Well it's like saying "how much is a car"
[00:43:55] <Landon> well, how much is a 2 layer 2" car :P
[00:44:03] <Casper> CapnKernel: I'm waiting for a phone tech tomorrow...
[00:44:11] <Casper> ... somewhere between 12 and 21h....
[00:44:29] <CapnKernel> With or without sound-system?
[00:44:41] <CapnKernel> Casper: Well that narrows it down a bit!
[00:44:47] <Landon> well, it could use a good 8-track
[00:45:05] <Casper> and the tech will probably come and say: can't do anything, however if you were with sympatico we could do more
[00:45:18] <CapnKernel> Don't dare go to the toilet during that time, it could be the five mins the tech turns up, and then it's right back to the end of the queue for you, young man!
[00:45:41] <atarax> well what it'll be is basically a 2x3.5" 2-layer card with around 30 vias, 10 mil traces and.. i dunno, a small gap at least around the chip, although I switched from QFN to QFP because putting vias under the chip helped a lot
[00:45:53] <skorket> Casper, thanks for the help, I hope that does it
[00:46:38] <Casper> CapnKernel: actually if I miss him... I'll have to make him come back for 85$....
[00:48:09] <Casper> CapnKernel: I'm supposed to be able to get 25/7Mbit on this line, I get 19M/824k... the uplink should be about 1.2Mbit
[00:48:13] <Casper> on this plan
[00:58:15] <jadew> how much do you pay for that line?
[00:59:31] <Casper> 16Mb/1Mb unlimited bw (true illimited) 59.99 per month
[00:59:43] <jadew> damn, that's a lot
[00:59:52] <Casper> 300GB is 45.99
[00:59:58] <skorket> "CapnKernel gave me a quote, and oh my, the prices are very nice"
[01:00:15] <Casper> bed time, see ya
[01:01:11] <jadew> you guys are being robbed with those rates
[01:01:41] <jadew> I pay $12 for 100/100 + lots of othher free features
[01:02:34] <jadew> like free mobile data plan with unlimited traffic and free phone calls within the same network
[01:55:55] <Landon> so I'm looking at a motor in an RC car
[01:56:11] <Landon> it has a cap across its terminals
[01:56:20] <Landon> but also a cap soldered onto the body
[01:56:28] <Landon> and to one of the terminals
[01:56:57] <Landon> what would that be for?
[01:57:40] <Landon> actually, the cap going between terminals has its other lead soldered to the other side of the motor
[02:04:11] <SianaGearz> Landon: probably on brushed motor, to reduce RF noise, so the commutation noise doesn't jam the remote control?
[02:05:52] <Landon> SianaGearz: hm, no idea what kind of motor it is, is there any way to easily tell
[02:06:28] <Landon> I'd really like to play around with making a stepper motor controller using it, but I'm not sure what I'm getting myself into with these caps and such :P
[02:06:56] <SianaGearz> stepper motor, in an RC car? very unlikely.
[02:07:16] <Landon> right, I want to make a controller to make it a stepper motor
[02:07:26] <SianaGearz> to make what a stepper motor?
[02:07:36] <Landon> the motor from the RC car
[02:07:46] <SianaGearz> you have to find a stepper motor first somewhere.
[02:08:04] <Landon> really?
[02:08:16] <Landon> I thought a stepper motor was a regular old motor with some control systems
[02:09:06] <SianaGearz> stepper motor usually has 6 pins.
[02:09:51] <SianaGearz> sorry, i lied, at least 4.
[02:10:13] <Landon> oh, I see what you're saying now
[02:11:15] <SianaGearz> 4, 5 or 6 wires.
[02:11:27] <SianaGearz> or 8.
[02:13:08] <Landon> guess I'll just have to find something else to do with this then :P
[02:15:25] <SianaGearz> an old Epson or so printer with clogged nozzles. you should be able to get one for free, you receive two identical motors. iirc.
[02:15:58] <Landon> might even have an old scanner around
[02:16:36] <SianaGearz> pah. your old scanner might still be in a working condition. would be a waste.
[02:16:50] <SianaGearz> also, scanner only has one motor.
[02:17:23] <Landon> my old scanner has a parallel port :(
[02:18:47] <SianaGearz> Landon: unless what you have is a laptop, your PC probably still has a parallel port hidden as a pin-header on the mainboard :P
[02:18:55] <orated> Hello! When a serial port (RS232 DB9 connector) is not available in desktop/laptop what is usually preferred for serial port programmer?
[02:19:20] <Landon> heh, fair
[02:22:44] <SianaGearz> orated: FTDI based USB->RS232 controller is most compatible, has iirc no pins inoperable, and those things are a bit expensive. but if you don't have special requirements, any usb-serial cable from china (based on Prolific chip) for 1$ with shipping will probably do. depends on what you will use it for.
[02:31:23] <orated> Thanks SianaGearz
[02:31:41] <SianaGearz> so what is it you'll be connecting to it?
[02:32:12] <SianaGearz> bit banging programmers usually need ftdi, but work with them at about 1/100th the speed of hard serial port.
[02:32:14] <orated> My board is something like this - http://www.bravekit.com/image/cache/data/AT90USB162DB/AT90USB162_DB_top-500x500.jpg - and it got a female RS232 DB9 female connector. When at insti, I connect it with the a serial cable (male to female) from desktop. It is basically used to program uC present on the board. My laptop only got usb,hdmi and mini display port
[02:32:45] <SianaGearz> looking.
[02:33:08] <orated> Its like any other board with RS232 DB9 female
[02:34:27] <SianaGearz> wait, it looks like you don't need any programmer at all.
[02:34:48] <SianaGearz> should be self-programming over usb, at least the page says...
[02:34:56] <orated> which page?
[02:35:16] <orated> That was just an example that my board got a RS232 DB9 like its on that board
[02:35:31] <SianaGearz> *blink*
[02:35:38] <SianaGearz> can you please be more precise?
[02:35:40] <orated> ok, one moment
[02:36:25] <SianaGearz> because... on the board you pointed to, rs232 is NOT for the purpose of programming the device, it's for the purpose of having the device communicate with an outside world :P
[02:36:34] <orated> yes
[02:37:17] <orated> to communicate with help of something like gtkterm - serial port terminal
[02:37:53] <orated> This is the actual board - http://code.google.com/p/uniboard/
[02:38:19] <orated> It got a programmer but for trying UART, I need to be able to connect RS232 DB9
[02:38:35] <SianaGearz> for terminal connection 1$ china usb-serial cable is sufficient.
[02:39:00] <orated> If its 1$ then it can DIY
[02:39:38] <orated> Could you link me to one ? Its like - http://www.amazon.com/TRENDnet-RS-232-Serial-Converter-TU-S9/dp/B0007T27H8/ref=lh_ni_t - right?
[02:39:42] <SianaGearz> looking.
[02:40:20] <SianaGearz> wait, i look at the board first :)
[02:40:27] <orated> sure
[02:40:30] <SianaGearz> boot loader programme is just as important as hardware.
[02:41:01] <SianaGearz> unless you already have a proper programmer which if you had you'd probably not have the question now :P
[02:41:49] <orated> Yes, there is already one present
[02:42:00] <SianaGearz> ha, the one you linked to could even be the expensive FTDI cable variety :P
[02:42:27] <SianaGearz> ah no, it's prolific.
[02:42:43] <orated> Problem is that at insti when learning with the help of the board, we use the serial cable and the old desktops got a port for the same.
[02:43:14] <orated> But not my laptop
[02:43:27] <orated> Ok, so usb-rs232 one will do?
[02:44:50] <orated> Could you link me to 1$ china usb-serial cable?
[02:45:44] <SianaGearz> when i said cheap, i meant this: http://dx.com/sku-24799
[02:46:11] <SianaGearz> but i clearly remember them bein <1.50 $ a piece. perhaps when ordering 20 or so? :P
[02:47:29] <orated> I think I got the converter present in here - http://image.made-in-china.com/2f0j00KBmaSHqcyIkO/USB-to-Serial-RS232-Adapter.jpg - right one
[02:48:16] <SianaGearz> or perhaps dx is getting more expensive. or perhaps i've seen them cheap on another hongkong store.
[02:48:41] <SianaGearz> orated: try it, does it work>
[02:48:45] <SianaGearz> ?
[02:49:53] <SianaGearz> if something fails, no huge sense getting another one till you have a clear answer why it would be failing, cause... the cheapo ones aren't exactly made to solve problems, and most likely the innards are exact same.
[02:50:06] <orated> I found the exact thing - http://image.made-in-china.com/2f0j00KBmaSHqcyIkO/USB-to-Serial-RS232-Adapter.jpg - trying it
[02:57:50] <orated> No, not working :(
[02:58:15] <SianaGearz> ha, i just discovered that the cheapo converters are no longer made with prolific, something even buggier -.-
[02:58:29] <SianaGearz> so puh.
[02:59:23] <SianaGearz> well, don't buy the one i linked for your purpose is as much as i can say about it -.-
[03:00:12] <SianaGearz> orated: oh have you determined which comport the usb device installed itself as and specified it properly in the terminal software you use?
[03:00:56] <SianaGearz> cause if it's just used for terminal, i would bet at least some activity would to be seen.
[03:01:50] <orated> Serial port /dev/ttyS0
[03:01:52] <orated> and
[03:01:57] <SianaGearz> ah you're on linux...
[03:04:41] <SianaGearz> ok i don't remember, but i have slight doubts S0 would be your USB device. because the board can have one or two serial ports configured even if there is no port connector.
[03:07:39] <SianaGearz> orated: how about /dev/ttyUSB0 does it exist?
[03:08:29] <SianaGearz> or just about anything else named on a different scheme which could be it.
[03:08:45] <SianaGearz> or look into dmesg just when you plug the USB device in :P
[03:13:13] <orated> SianaGearz: Oh, I know how to figure that out
[03:13:15] <orated> ttyACM0
[03:14:53] <SianaGearz> that looks like it could be the programming interface of your board, but well, could be the cable.
[03:16:16] <orated> USB ACM device
[03:16:38] <orated> And I'm trying to understand why - device not accepting address 41, error -32
[03:20:35] <orated> Anyway thanks SianaGearz. I'll see if this works else I'll have to get what you suggested initially
[03:21:50] <SianaGearz> at which stage is your problem? can you communicate with USB programming interface of the atmel board normally?
[03:22:15] <orated> Yes, I'm able to transfer hex with USB
[03:22:27] <SianaGearz> cause i would exactly suspect that the programming interface is in fact yet another emulated serial port and should be a ttyACM*
[03:22:37] <SianaGearz> ah ok, one problem less.
[03:22:45] <orated> Yes ..
[03:22:47] <orated> trying that
[03:23:30] <orated> Working! :D
[03:23:49] <SianaGearz> so the serial cable is ttyACM1?
[03:24:05] <orated> I had to change Port configuration in gtkterm from /dev/ttyS0 to /dev/ttyACM0
[03:24:15] <SianaGearz> ah ok.
[03:24:20] <SianaGearz> so you have everything working now?
[03:24:25] <orated> Yep!
[03:24:32] <SianaGearz> congratulationsy.
[03:24:39] <orated> Thanks a lot
[04:22:01] <Wolfgang1> Hi, I've got an problem - I set the fuses of an atmega32 to lfuse=0x80, hfuse=0x03 and now, I can't connect it throught isp - can some1 help?
[04:23:41] <jd_ce> does that disable the reset pin
[04:23:48] <jd_ce> or change the clock
[04:24:34] <Wolfgang1> i think the clock
[04:25:00] <desaster> http://www.engbedded.com/fusecalc
[04:25:16] <Wolfgang1> http://www.engbedded.com/fusecalc tells me on "low" that bodlevel is off, boden is on, sut1 is on, cksel3,2,1 and 0 is on
[04:25:40] <Wolfgang1> But I dont know how to fix that thing..
[04:26:08] <Wolfgang1> I have an external quarz with 6 MHz that i want to use
[04:29:41] <Wolfgang1> but now it seems that the avr dont starts...
[04:30:42] <orated> Hi! Is there any documentation available for serial, parallel and such communications and the ports/protocols for them?
[04:31:28] <mitsakos> i'm writting in C with seperate files for example, i have a file which includes all the function need to move a motor and another file with functions to control a sensor. I want to have public a array[] where main.c functions can write as well as motor.c functions. How i have to declare this array?
[04:33:14] <jd_ce> you can use extern to access it
[04:34:13] <jd_ce> orated, wikipedia should have documentation on spi, i2c, i2s, and other serial protocols
[04:34:36] <mitsakos> yeah i saw thank you
[05:39:50] <Metalsutton> Can anybody help me please?
[05:40:14] <Metalsutton> Ill just throw out the question regardless
[05:40:30] <mrfrenzy> please do
[05:41:02] <Metalsutton> So I got my first programmr AVRISPMKII. Got it all hooked up, after a bit of playing around on a breadboard. Got it to program.
[05:41:28] <Metalsutton> programmed the hex file with avrdude , then the hexes.
[05:42:30] <Metalsutton> still on a breadboard, I created another identical circuit to program the chip. This time I get a device code 000000x0 or whatever, so its bascialy saying it couldnt detect the chip.
[05:42:54] <Metalsutton> (to programm another chip i should say) ... these are all ATMEGA8's
[05:43:07] <mrfrenzy> probably you changed some fuses that has to do with clock or similar
[05:43:14] <mrfrenzy> so it doesn't work with your current connection
[05:43:20] <mrfrenzy> try connecting an external clock
[05:43:21] <Metalsutton> hold up, not finished
[05:44:26] <Metalsutton> So because I was hooking up the programmer with jamming cables into the socket. I figured it may have been to a lose connection on the breadboard.
[05:45:04] <Metalsutton> So to avoid any connection problems I have soldered (quite well too) a programming circuit. I now no longer get the 000000x0 error
[05:45:56] <Metalsutton> What has replaced it is now : stk500v2_command(): command failed
[05:46:22] <Metalsutton> stk500v2_command(): unknown status 0xc9
[05:47:18] <Metalsutton> ok, now im done :P any ideas anyone?
[05:48:16] <SianaGearz> confuzzled. you have two chips.
[05:48:21] <SianaGearz> one burned fine.
[05:48:38] <SianaGearz> other, you suspect connection problems once, and since, it doesn't burn?
[05:48:54] <Metalsutton> I have heaps of atmega8's
[05:49:11] <Metalsutton> because this was my first time programming, i used a breadboard.
[05:49:43] <SianaGearz> ah. so now all chips don't program any longer?
[05:49:47] <Metalsutton> that managed to program fine. However I have since disconnected the programmer and that board is still hooked up and working with a usb
[05:50:03] <Metalsutton> 1st chip. Fine.
[05:51:06] <Metalsutton> 2nd chip, I created an identical board and it didnt work, There may have been a loose connection or something. however now that I have soldered a programming board together with ZIF on a stripboard. I get a completely diffrent error.
[05:51:55] <Metalsutton> Using Port : usb
[05:51:56] <Metalsutton> Using Programmer : avrispmkII
[05:51:56] <Metalsutton> Setting bit clk period : 1.0
[05:52:16] <Metalsutton> "avrdude: stk500v2_getsync(): found AVRISP mkII programmer"
[05:52:29] <Metalsutton> so its not like it hasnt found it or anything
[05:59:10] <Metalsutton> I have ran -vvvv with it and when I look on google for the problem there are others posting the exact same report, even down to the bit communication numbers
[06:00:31] <mitsakos> is there any way to write a constant table (using avr-gcc) in the lower 64k of rom in order to use pgm_read_byte instead of pgm_read_byte_far?
[06:01:51] <Metalsutton> woah.
[06:02:05] <Metalsutton> remember, first timer here :P
[06:02:39] <mrfrenzy> Metalsutton: so if you try a new chip, you get the same problem?
[06:06:55] <SianaGearz> mhm, if the board is super correct right now, maybe the original one was so wrong that it worked?
[06:08:15] <SianaGearz> .oO(i think you might laugh at this later)
[06:08:54] <Metalsutton> haha
[06:09:10] <Metalsutton> yes. new chip, same problem.
[06:09:29] <Metalsutton> Is there suppose to be +5 coming from the reset pin?
[06:13:30] <Metalsutton> 5v?
[06:16:09] <SianaGearz> considering it's actually !RESET, and the ISP needs to be resetting the chip to program it, i'd say you should actually expect gnd on it.
[06:16:29] <SianaGearz> while the programmer is working anyway.
[06:16:55] <Metalsutton> hhmmmm
[06:16:56] <SianaGearz> when device is working, there should be +5v there.
[06:17:43] <SianaGearz> or whatever vcc
[06:22:52] <Metalsutton> I SHOULD be able to get it to program with the clock in the chip? Its brand new etc.
[06:24:27] <SianaGearz> worked once, should work again, right.
[06:24:39] <Metalsutton> correct
[06:28:01] <molavy> hi
[06:28:46] <molavy> how can i connect avr to ethernet
[06:31:00] <molavy> i have ENC28J60 atmega32 and magjack rj45
[06:31:16] <molavy> but i can't find good tutorial
[06:41:19] <molavy> any idea?
[06:43:45] <molavy> there is no idea?
[06:51:46] <Tom_itx> molavy get an arduino with an ethernet whachamacallit
[06:52:11] <Metalsutton> port
[06:52:46] <Tom_itx> shield
[06:54:12] <Metalsutton> bridge
[06:54:22] <Metalsutton> weapons
[06:56:12] <Tom_itx> no they call them shields
[06:56:28] <Tom_itx> give the noobs a sense of power
[06:57:48] <Tom_itx> http://arduino.cc/en/Reference/Ethernet
[06:57:51] <Tom_itx> oh lookie there
[07:00:00] <Metalsutton> hahah. i was implying port and sheild (like some sci-fi spacestation)
[07:02:14] <Tom_itx> http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/
[07:02:19] <Tom_itx> there's even a tutorial for something
[07:03:07] <molavy> no, i don't want make arduino with ethernet support, i want connect rj45 to avr via ENC28J60 as simple as possible
[07:06:06] <Tom_itx> http://www.modtronix.com/product_info.php?products_id=319
[07:06:09] <Tom_itx> spi interface to one
[07:07:53] <Tom_itx> olimex has one too: http://webferret.search.com/click?wf,avr+ENC28J60,21,www.olimex.com%2Fdev%2Fenc28j60-h.html,,entireweb
[07:09:57] <molavy> any idea?
[07:10:09] <molavy> i found this: http://tuxgraphics.org/electronics/200606/article06061.shtml
[07:10:15] <Tom_itx> never done it
[07:10:25] <molavy> but it use atmega88
[07:11:16] <cyanide> my mum's home after her bone marrow transplant :)
[07:11:19] <cyanide> yay
[07:11:21] <Tom_itx> that's an avr isn't it?
[07:12:29] <cyanide> fuck shields
[07:12:41] <cyanide> it's like stacking soap bars on top of each other
[07:12:53] <cyanide> so now you have one soap for your hair, one for your body, one for your face
[07:13:51] <Tom_itx> but i'm told they make it easy for a noob to make a pro look bad
[07:14:23] <Tom_itx> (until they have to debug something)
[07:14:34] <cyanide> i never understood the point of shields. and i progressed from an arduino
[07:14:48] <cyanide> why not just use a breakout board and a breadboard
[07:15:16] <Tom_itx> they skip half the learning curve
[07:25:04] <molavy> is there any tutorial for connecting ENC28J60 to atmega32
[07:26:00] <Tom_itx> SPI
[07:26:10] <Tom_itx> is pretty straighforwared
[07:26:50] <Tom_itx> figure out the phase and polarity and set it accordingly
[07:35:55] <mitsakos> i'm trying to use uart i have included <avr/io.h> but when i compile the code it says RXEN, UBRRH, UBRRL etc undeclared
[07:37:01] <desaster> maybe they're like RXEN0, UBRRH0, ...
[07:40:33] <SianaGearz> actually molavy's idea of using enc28j60, some magjack anc atmega32 wasn't so bad, i have seen projects which do exactly this.
[07:40:33] <SianaGearz> why should he buy something if he already has everything.
[07:40:34] <mitsakos> desaster no.. they aren't
[07:40:35] <SianaGearz> i think one of them was on microkontroller.net or whatever the german wiki/community was called...
[07:41:09] <SianaGearz> mikrocontroller.net, this way around.
[07:41:44] <desaster> hmm or maybe not like that
[07:41:44] <desaster> UBRR0H
[07:44:39] <SianaGearz> molavy: you were probably looking for this: http://www.ulrichradig.de/home/index.php/avr/eth_m32_ex
[07:46:24] <mitsakos> yes that's it thank you
[07:58:16] <Metalsutton> Does anyone know where I can get AVRDUDE 5.11.1 for windows?
[08:02:54] <SianaGearz> you need very specific version?
[08:03:47] <SianaGearz> build from source, or have someone build from source for you. i could do it if you super like.
[08:04:22] <Metalsutton> I am having problems programming with any other version with my programmer, and I read that 5.11.1 fixes it.
[08:12:18] <RikusW> https://thepiratebay.se/blog/210
[08:14:25] <specing> Lol
[08:22:46] <SianaGearz> there are still shipping and stocking difficulties with raspberry pi.
[08:25:10] <cyanide> has anyone tried these boards http://www.mikroe.com/eng/products/view/755/ready-for-xmega-board/
[08:29:47] <RikusW> 1 bit cpu -> http://foulab.org/en/user/strawdog/Golem
[08:32:00] <Valen> sorta kinda 1 bit
[09:48:19] <molavy> i have this :
[09:48:22] <molavy> http://www.upload.iran-forum.ir/download96267.html
[09:48:48] <molavy> but i don't have M74HCT125
[09:50:38] <DrLuke> Hi, is it possible that parts of my code is written in assembly, while another part is written in C? I'm using AVRStudio 4 (probably should get 5 :P)
[09:50:50] <ziph> DrLuke: Yeap.
[09:51:11] <DrLuke> Neato, what do I have to google for?
[09:51:13] <ziph> DrLuke: You can either write entire .c and .s (assembler) files or do inline assembler in the .c files.
[09:51:29] <ziph> DrLuke: What kind of assembler do you need to do? Little snippets?
[09:51:35] <ziph> Or entire functions?
[09:52:19] <DrLuke> well, I want the first part of the code to manage some things that don't require speed, but then my code shall change into a mode where the task is executed as fast as possible
[09:52:25] <DrLuke> so, it would be a loop
[09:52:54] <ziph> If you just want to do parts of functions look up "gcc inline assembler".
[09:53:26] <DrLuke> Well it's really just 1 function and an interrupt
[09:53:58] <ziph> If you're doing entire functions doing a .s file and linking it in might be neater.
[09:54:09] <ziph> In which case you want details on GNU AS.
[09:54:11] <specing> nah, inline asm can do it
[09:54:22] <specing> naked functions...
[09:55:32] <ziph> Putting them in .s files is still neater.
[10:04:08] <DrLuke> well
[10:04:20] <DrLuke> inline will be just as fast as normal assembly, right?
[10:04:23] <DrLuke> performance wise
[10:05:08] <specing> yeah
[10:12:35] <DrLuke> ok thanks guys :)
[10:24:24] <mapee> hey
[10:41:56] <molavy> i found avrnet project too,
[10:41:58] <molavy> http://www.avrportal.com/avrnet/avrnet.gif
[10:42:48] <molavy> i don't have 25Mhz ocillator
[10:44:54] <molavy> i have one write on it : 24.576 . can i use it instead of 25mhz
[10:44:56] <molavy> ?
[10:47:06] <molavy> and another with 25.576g2v on it
[10:48:11] <DrLuke> there's hotlink protection on your link
[12:22:39] <specing> CapnKernel: Hey
[12:23:49] <specing> CapnKernel: You could look into #arm-netbook ( they are building some $15 1.2 Ghz cortex-a8 credit card-sized computers) I've heard them mention Shenzen :D
[12:24:24] <OndraSter> :D
[12:25:40] <OndraSter> guys, I am looking for a way how to talk with PC with atmega with >12Mbit speeds. Ergo not full-speed USB 2.0 but high speed connection...
[12:25:54] <OndraSter> I even thought about using 100Mbit ethernet
[12:26:06] <OndraSter> ... or switch to ARM device with integrated USB high speed
[12:28:09] <specing> I can login to my ARM Linux system and do 5 UARTs from there xD
[12:28:35] <OndraSter> :)
[12:29:02] <asteve> 5 UARTs?
[12:29:16] <asteve> how many UARTs does it take to build a bridge?
[12:30:17] <asteve> 2, one to talk build the bridge and one to talk shit about I2C
[12:30:28] <asteve> *badump tsch*
[12:36:42] <OndraSter> damn, is there any cheap ARM that has USB 2.0 high speed?
[12:36:53] <OndraSter> and 32+ IO lines?
[12:37:56] <OndraSter> those NXP LPC* look good... but only USB full speed
[12:38:06] <OndraSter> and what is 72MHz good for when you can not push more than 12Mbit anyway
[12:39:46] <specing> OndraSter: my ARM is full speed but has 100Mb ethernet
[12:39:53] <OndraSter> how much was it?
[12:40:10] <OndraSter> ethernet has the advantage of not needing USB drivers... but requires ethernet :P
[12:41:43] <OndraSter> but... it requires TCPIP/UDP stacks and what not
[12:42:47] <specing> E50
[12:43:01] <specing> OndraSter: Linux...
[12:43:14] <OndraSter> oh
[12:43:21] <OndraSter> well that wouldn't help me really
[12:43:24] <OndraSter> I don't want to run linux on it
[12:46:27] <OndraSter> also, 2MBaud = 2MBit data rate (if I do not count the extra start/stop bits etc)?
[13:59:19] <OndraSter> waait
[13:59:25] <OndraSter> no DMA channel in xmega32d4?
[13:59:37] <lifeeth> :D
[13:59:42] <OndraSter> ripoff :P
[14:14:06] <OndraSter> abcminiuser, heya, how big speeds can you get from USB on xmegas? In theory 12Mbit, I know, but in reality, if you were fetching the data from Port and sending them to USB through DMA (if possible)?
[14:14:32] <abcminiuser> OndraSter, there's a video on YouTube from Atmel about it, one sec
[14:14:48] <OndraSter> found it :)
[14:14:49] <OndraSter> thanks
[14:14:54] <OndraSter> http://www.youtube.com/watch?v=iepf0CHr6Hk
[14:15:14] <abcminiuser> That's the one
[14:15:35] <OndraSter> not bad, 8.72Mbps
[14:15:35] <abcminiuser> TLDR with a stack optimized for it you can almost max out the USB bus
[14:15:38] <abcminiuser> At Full speed
[14:16:08] <Steffanx> And do nothing but handling the data?
[14:16:18] <OndraSter> DMA :)
[14:16:35] <Steffanx> Yeah, but 'something' has the generate the data
[14:16:38] <Steffanx> fill the buffer
[14:16:40] <Steffanx> whatever
[14:21:09] <OndraSter> abcminiuser, looks impressive lol
[14:21:17] <OndraSter> xmega32a4u it is!
[14:21:20] <OndraSter> (or was it a3u?)
[14:21:47] <abcminiuser> Either
[14:21:53] <abcminiuser> They're both decent
[14:25:32] <OndraSter> I need just USB + DMA + few ports :)
[14:25:35] <OndraSter> and one timer
[14:25:38] <OndraSter> no need for anything more really
[14:27:57] <ferdnaO> yes
[14:40:37] <Steffanx> no
[14:42:01] <OndraSter> maybe
[14:42:28] <RikusW> ?
[14:42:36] <OndraSter> !
[14:42:37] <Steffanx> !
[14:42:48] <Steffanx> ¿
[14:42:54] <RikusW> @
[14:43:02] <Steffanx> ⁄i
[14:43:15] <Steffanx>  :P
[14:43:33] <Steffanx> You probably don't see that one
[14:43:56] <RikusW> והאת
[14:44:21] <Steffanx> me doesn't speak/read hebrew
[14:45:26] * RikusW have phonetic hebrew layout ;)
[14:48:40] <RikusW> at least you recognize it...
[14:55:04] <Steffanx> Google translate did RikusW ::P
[14:55:47] <RikusW> what did it translate to ? :-P
[14:56:35] <RikusW> והאת > what
[14:57:02] <Steffanx> And shovel ..
[14:57:23] <RikusW> lol
[14:58:07] <RikusW> normal english can sort of be written using hebrew letters....
[15:32:09] <ThersiT> I want to make a kind of two way radio.. I think I could just send the data from a codec to some sort of wireless link. Does anyone know of a wireless setup with a decent amount of range?
[15:32:47] <ThersiT> I've looked at xbee/zigbee and they don't seem to go too far.
[15:33:00] <specing> conventional radio?
[15:33:18] <ThersiT> Like FM?
[15:34:07] <OndraSter> what data rates?
[15:34:28] <Phantom> and what distance?
[15:35:03] <ThersiT> Just good sounding voice. Maybe a half a mile.
[15:35:48] <ThersiT> It would also be used inside big buildings with concrete and steel.
[15:36:00] <specing> ThersiT: data rate depends on frequency, distance depends on power and antena
[15:37:59] <ThersiT> As for frequency, 900MHz seems to have cleared up some. But I really don't know yet.
[15:39:23] <ThersiT> For power, one end of this thing would be portable so it would need to be low power enough for battery.
[15:42:42] <Kevin`> ThersiT: what's "decent"? how much data througput do you want?
[15:43:17] <ThersiT> For "conventional radio" what would I call that to google it? Are there single chip transceivers or is it more complicated then that?
[15:43:18] <Kevin`> ThersiT: mm, half a mile through concrete and steel will be difficult
[15:44:56] <ThersiT> Oh I meant half a mile outside. In side maybe a few hundred yards.
[15:45:11] <Kevin`> oh, that's more doable
[15:45:31] <Kevin`> do you need digital transmission or would analog voice be ok? either is possible
[15:46:41] <ThersiT> decent? I'm not sure. I'm really new to all this. I would love analog.
[15:47:45] <asteve> party people voodoo people
[15:47:48] <Kevin`> there's two-way radios you can buy at retail stores that will do this, depending what you are using it for
[15:47:51] * RikusW did a single transistor FM transmitter at 108MHz, but it is very unstable
[15:47:54] <asteve> how can i multiply by 7 using shifts?
[15:48:06] <asteve> multiply by 8 is a 3 shifts to left
[15:48:12] <asteve> 7 is two shifts and?
[15:48:29] <RikusW> 3 shifts and subtract once
[15:49:34] <asteve> RikusW: ok, how do you divide by 5?
[15:50:03] <ThersiT> I'm trying to make a wireless extension to an intercom that my friend makes and sells so I don't want to make it out of a walkie talkie.
[15:50:24] <RikusW> x = a << 2; x += a;
[15:50:46] <specing> RikusW: divide...
[15:51:03] <RikusW> ugh
[15:51:19] <RikusW> x = a >> 2;
[15:51:22] <RikusW> x -= a;
[15:51:37] <specing> nopenopenope
[15:51:40] <RikusW> err
[15:51:41] <ThersiT> RikusW: Do you have a tutorial on your transmitter?
[15:52:04] <RikusW> ThersiT: its very simple and VERY unstable
[15:52:35] <RikusW> ThersiT: www.epanorama.net
[15:52:46] <RikusW> that should help you a bit, I hope
[15:52:52] <ThersiT> Not something that could be a good starting point then?
[15:53:33] <ThersiT> I'll check it out. Thanks.
[15:53:37] <RikusW> think I got the schematic there
[15:53:48] <RikusW> it was like 10 years ago....
[15:56:32] <asteve> RikusW: following your example i get -38
[15:56:37] <asteve> for 50 / 5
[15:57:14] <RikusW> yup though it was a bit wrong
[15:57:35] <asteve> if you shift left by 2 you get the division by 4
[15:57:42] <RikusW> yes
[15:58:24] <raek> left shift is multiplication by two
[15:58:24] <asteve> man i forgot how to do this stuff… hah
[15:58:33] <asteve> sorry, right shift
[15:59:07] <specing> asteve: the best is to just sub 5 times
[15:59:17] * RikusW isn't entirely awake anymore
[15:59:29] <specing> RikusW: EXCUSES!! ! :D
[15:59:37] <RikusW> lol
[15:59:49] <asteve> specing: that's fairly slow on large numbers
[16:00:01] <specing> asteve: dude you said / 5
[16:00:09] <specing> then sub 5 times
[16:00:19] <asteve> specing: because i used to remember the correct answer for 900000000/3242342
[16:00:19] <RikusW> subtract 50000 then 5000 then 500 then 50 then 5
[16:00:49] <specing> if you want a sophisticated runtime function, go study maths
[16:00:56] <RikusW> should be a lot faster than only using 5
[16:01:44] <asteve> i remember an exam question that was something like x = 5; write asm for x * (5/8)
[16:02:00] <specing> arch?
[16:02:24] <asteve> at the time it was lc3b but the question was geared to using only shifts and add/sub
[16:02:40] <asteve> maybe looping was the right answer and i don't remember
[16:02:51] <specing> its really simple, your example
[16:03:09] <specing> ((x >> 2) + x) << 3
[16:03:14] <asteve> my example is simple but the question wasn't; this is all caused by my lapse of memory :p
[16:04:01] <asteve> 3/9 for example becomes less simple; ((x >> 1) + x) << 3 then?
[16:05:45] <Landon> 3x/16
[16:06:22] <specing> asteve - (9 >> 3) :D // could work
[16:06:25] <asteve> actually everything that you and i just wrote is wrong
[16:06:35] <asteve> it should be (x << 2) + x >> 3
[16:07:01] <specing> also wrong
[16:07:03] <asteve> with parenthesis around the multiplication portion
[16:07:10] <Landon> that's still 5x/8, no?
[16:07:15] <specing> ye
[16:07:17] <asteve> Landon: ya, the original problem
[16:07:20] <specing> we want 3/9
[16:07:29] * RikusW head hurts ;)
[16:07:35] <asteve> specing: wrote: [16:53:32] <specing> ((x >> 2) + x) << 3
[16:07:45] <asteve> which is some crazy answer
[16:07:46] <asteve> hah
[16:07:56] <asteve> left shifts and right shifts; they're nothing to joke about
[16:07:59] <specing> asteve: that's understandable I got it wrong, you can never turn these operators right
[16:09:50] <asteve> 3/9 without looping is what we want
[16:10:14] <asteve> with multiplication you can add in the original value but division you can't do the inverse
[16:10:18] <asteve> you'll end up with some crazy number
[16:13:23] <specing> asteve: ((x << 2) + x) >> 3 - (9 >> 3)
[16:14:45] <asteve> specing: you're subtracting 1 at the end
[16:14:52] <specing> exactly!
[16:16:26] <asteve> i don't think that's the correct answer
[16:17:23] <OndraSter> are there any advantages with using QFN chips over TQFP? Any other than that it looks cooler ofc
[16:17:28] <OndraSter> (price is the same)
[16:18:09] <OndraSter> abcminiuser_, I found bug in datasheet!
[16:18:09] <OndraSter> http://www.atmel.com/Images/doc8387.pdf
[16:18:11] <OndraSter> check page 2
[16:18:19] <OndraSter> it will take you <second to find it :)
[16:18:36] <abcminiuser_> Which chip? I have all the datasheets locally
[16:18:47] <OndraSter> it is whole atxmega16/32/64/128a4u
[16:18:59] <OndraSter> aka xmega a4u
[16:19:50] <asteve> specing: i believe the correct answer is ((x << 2) + x) >> 3 - (9 >> 1)
[16:20:07] <abcminiuser_> ATxmega32A4U-AU
[16:20:07] <abcminiuser_> 128K + 4K
[16:20:17] <OndraSter> eexactly :)
[16:20:27] <OndraSter> all 32kB devices have 128kB
[16:22:52] <RikusW> no-one will complain if the chips have more flash than spec :-P
[16:24:07] <OndraSter> :D
[16:24:44] <specing> asteve: I believe the correct answer is not an one-liner
[16:24:55] <asteve> you're probably right
[16:26:34] <specing> asteve: Im looking forward to studying maths and writing a u24/s24 math library for GCC
[16:29:34] <asteve> u24 == unsigned 24bit?
[16:30:13] <RikusW> yes
[16:30:50] <specing> yes
[16:30:58] <OndraSter> what, I thoguht that LDOs can work when Uin = Uout without any drop?!
[16:31:07] <specing> I started working on it a year ago
[16:31:38] <OndraSter> but that favourite 1117-33 has 1.2V drop
[16:32:06] <specing> I've got my mosfet operating as a LDO...
[16:32:36] <specing> Its just overheating all the time
[16:33:31] <OndraSter> when I am doing 1.8V and 3.3V parts, is it better to put the 1.8V reg AFTER the 3.3V or source it from the same source as the 3.3V one?
[16:33:48] <OndraSter> there is some internal current when in offline mode always, so it drives the 3.3V one a bit more...
[16:33:55] <OndraSter> plus less noise
[16:43:36] <OndraSter> plus, any reason to use external xtal, when there are already few built into the xmega alreay? :)
[16:43:41] <OndraSter> with presumably good precision
[16:43:43] <OndraSter> already tweaked
[16:54:20] <Kevin`> OndraSter: for most purposes, no
[16:54:43] <OndraSter> ook
[16:54:46] <OndraSter> thanks :)
[16:55:24] <Kevin`> if you want a clock accurate enough for timing purposes, attach a watch crystal to it
[16:55:44] <OndraSter> I don't need _that_ accurate clock :)
[16:56:20] <OndraSter> damn, USB overlaps SPID :(
[16:56:37] <OndraSter> abcminiuser_, why is there half of PortB and half of PortE instead one full PortB/E?
[16:56:41] <OndraSter> (xmega32a4u)
[16:59:20] <Kevin`> spid?
[16:59:29] <OndraSter> SPI PortD
[17:00:00] <Kevin`> heh, i've never needed more than one spi port. clock select and all that :)
[17:00:10] <Kevin`> chip select*
[17:00:11] <OndraSter> I need two 8bit ports :)
[17:00:34] <OndraSter> and only A and C were usable... till I noticed that D shares USB with SPI
[17:00:35] <OndraSter> that I require
[17:00:58] <OndraSter> I require one SPI, one TWI, one UART (for possible future), few GPIOs (pretty much just remaining stuff) and two 8bit ports
[17:01:04] <OndraSter> it would fit, if USB was somewhere else
[19:34:58] <CapnKernel> specing: thx
[20:14:52] <CapnKernel> ThersiT: I sell this chip: http://www.rdamicro.com/Products/Detail_122.aspx