#avr | Logs for 2016-10-08

Back
[02:47:46] <carabia> lo avr
[04:49:43] <anonnumberanon> oh sweet carabia is on they can help me
[11:32:32] <rue_house> ?
[11:33:33] * rue_house needs to do some cooking, 1 part IR reciever, 3 parts servo controller....
[12:55:29] <carabia> ir is so boring, use smoke signals
[12:56:07] <Thrashbarg> spark gap and coherer
[13:50:42] <Lambda_Aurigae> use twins with a psychic link and electro shock.
[13:52:07] <carabia> or use thebear eating 220 vac
[13:52:24] <carabia> i think you can get a valid signal in there somewhere... *wonders*
[13:53:32] <Lambda_Aurigae> yeah, buy you gotta pulse 440V at 400Hz.
[14:09:10] <carabia> Lambda_Aurigae: I did some calculations... Yeah seems right!
[14:54:18] <xPatsy> Would anyone know a good way to force erase on a running butterfly? It's hooked up via jtag on a dragon and it's stuck in a loop spewing out UART. So far avrdude just hangs but I am able to get it in to debug with avarice/gdb
[14:55:44] <carabia> i was under the impression that butterflies fly rather than run
[14:55:53] <Lambda_Aurigae> they walk nicely.
[14:55:58] <carabia> please don't force them to do anything, and don't hook them either.
[14:56:38] <Lambda_Aurigae> xPatsy, never used jtag on it but a regular ISP worked on mine.
[14:57:17] <xPatsy> This is my first experience with AVR and it's for my embedded systems class. Right now I'm kind of just stuck.
[14:58:17] <xPatsy> I can't reprogram it unless I can somehow kill / wipe the running program
[14:58:24] <Lambda_Aurigae> avrdude and jtag should just work if everything is hooked up right.
[14:58:37] <Lambda_Aurigae> when it goes into programming mode, the program will stop.
[14:59:33] <Lambda_Aurigae> if it's not going into programming mode, something is not hooked up right.
[14:59:34] <xPatsy> Up until this past hour I'd agree.
[14:59:57] <Lambda_Aurigae> it is either hardware or software.
[15:00:05] <xPatsy> I haven't disconnected or moved anything. It's just USB -> Dragon -> Butterfly over JTAG
[15:00:09] <Lambda_Aurigae> software being avrdude in this case.
[15:01:05] <Lambda_Aurigae> something wrong with usb,,,something wrong with the dragon,,,something not hooked up right,,as in, came loose maybe? One wire not quite tight
[15:02:11] <xPatsy> The USB and JTAG interface work fine because I'm able to put it in to debug mode and step through code using avarice / gdb
[15:02:22] <carabia> can you hook the avr's reset pin (or is it hooked) so you can drive it into reset?
[15:02:42] <xPatsy> Let me ... Find a spec sheet or something for that one then
[15:03:39] <carabia> i think with jtag you can drive the device into reset without hooking up the reset pin to the programmer (dragon) too, but worth a shot perhaps...
[15:04:13] <Lambda_Aurigae> if it was working, and stopped working, what changed?
[15:05:20] <xPatsy> Lambda_Aurigae: Made a code adjustment. Memory got clobbered for an array so it's flying through and eternally sending memory values over UART
[15:06:53] <Lambda_Aurigae> my suggestion would be to hook up an ISP programmer...like, the dragon in ISP mode.
[15:07:01] <Lambda_Aurigae> use that to wipe the chip.
[15:25:53] <rue_house> I dont suggest jtag, nothing else you can use?
[15:26:12] <Lambda_Aurigae> just use the dragon as an ISP programmer.
[15:26:34] <rue_house> if you have a parallel port on a computer, you can make an stk200
[15:26:52] <rue_house> I'd imagine time is an issue
[15:26:52] <Lambda_Aurigae> rue_house, there are only 3 of us here who still have USB ports.
[15:27:10] <rue_house> ... what replaced usb?
[15:27:14] <rue_house> apple?
[15:27:17] <Lambda_Aurigae> grrr
[15:27:22] <Lambda_Aurigae> parallel ports!
[15:27:27] <rue_house> ah, 3 is enough
[15:27:29] <Lambda_Aurigae> doing too many things at once.
[15:27:35] <rue_house> hehehe
[15:27:38] <Lambda_Aurigae> you, me, and maybe theBear
[15:27:43] <rue_house> oooh, those 3
[15:27:55] <rue_house> you know, I'v not used my parallel port programmer in like 4 years
[15:27:58] <Lambda_Aurigae> and xpatsy is gone.
[15:28:05] <Lambda_Aurigae> I used mine last week.
[15:28:18] <rue_house> I have 4? usb programmers
[15:28:20] <rue_house> maybe 3
[15:28:21] <Lambda_Aurigae> I use it more than my usb programmer.
[15:28:45] <rue_house> I dont even know if I still have the 25' parallel cable on the computer
[15:28:51] <Lambda_Aurigae> hehe.
[15:28:58] <rue_house> it would reach to anywhere in the shop
[15:29:10] <Lambda_Aurigae> I have an i5 laptop with a parallel port 5 feet from me
[15:29:27] <Lambda_Aurigae> and my 4 year old athlon has one too.
[15:29:58] <rue_house> I need to keep working on my tiny13 IR reciever here
[15:30:09] <rue_house> oh I just worked out where the other tiny13's are
[15:30:26] <Lambda_Aurigae> being lazy this weekend...watching "Sum of All Fears" at the moment and playing KSP
[15:30:53] <rue_house> I'm putting too much thought into a 'tilt and pan' laser
[15:31:03] <Lambda_Aurigae> fun fun
[15:31:09] <rue_house> finding lots of tangents
[15:31:22] <rue_house> like using 4mm BB's for 3d printed bearings
[15:31:29] <rue_house> bicycle style
[15:31:38] <Lambda_Aurigae> like, .177 cal BBs?
[15:31:52] <rue_house> nobody doing it knows about using a race to keep them spaced
[15:31:56] <rue_house> yea
[15:32:05] <Lambda_Aurigae> don't they have a flat spot?
[15:32:10] <rue_house> dunno
[15:32:25] <Lambda_Aurigae> it's been years, but, I remember them having a flat spot.
[15:32:29] <rue_house> I dont have any so I'm using 4mm bearings from steering columns on bicycles
[15:32:55] <rue_house> I'm substituting the substituted parts
[15:33:01] <Lambda_Aurigae> aahh.
[15:34:25] <Lambda_Aurigae> I considered doing a moving base that sat on a bunch of ball bearings...2D movement.
[15:35:20] <rue_house> that thought has crossed my mind before, I dont recall for which project
[15:35:43] <Lambda_Aurigae> one big 2D plate with lots of holes and bearings in the holes.
[15:35:53] <Lambda_Aurigae> big flat plate for it to run on
[15:36:09] <Lambda_Aurigae> and another plate to sit on top of it with some kind of devices to move it.
[15:37:43] <Lambda_Aurigae> normally for a 2D motion plate you have 2 sets of bearings in a # shape.
[15:38:09] <Lambda_Aurigae> slide bearings that is.
[15:41:12] <rue_house> how about trapped arms?
[15:41:16] <rue_house> no sliders
[15:41:43] <Lambda_Aurigae> trapped arms?
[15:41:49] <rue_house> http://cdn.protoolreviews.com/wp-content/uploads/2014/01/Axial-Glide.jpg
[15:42:03] <Lambda_Aurigae> hmmm
[15:42:08] <rue_house> there is only 1 axis they can move on
[15:42:13] <Lambda_Aurigae> interesting.
[15:42:31] <Lambda_Aurigae> not sure it will fit the application though.
[15:42:32] <rue_house> I worked out one that allows for xy movement, with no rotation
[15:42:39] <Lambda_Aurigae> but that would work for the Z axis.
[15:42:56] <rue_house> iirc it would take like 24 hinges
[15:43:01] <Lambda_Aurigae> ouch.
[15:43:12] <Lambda_Aurigae> too much play I would think without some serious tight stuff.
[15:43:41] <rue_house> dunno, not tried it yet
[19:43:58] <tiblock> Hi. Im new to avr, i bought atmega328p and USBAsp, made PCB for it with connector and it worked (not from first time ofcourse) and i made C code that blinks LED and it works. But clean C is too hard for me as newbie, is there some .h file with defined functions for turning on/off ports and PWM and timers to make it little easier for me? I use AtmelStudio
[19:58:09] <Lambda_Aurigae> how hard is it?
[19:58:35] <Lambda_Aurigae> set the port as output and turn the pin on and off?
[19:58:47] <Lambda_Aurigae> pwm is complex
[19:58:50] <Lambda_Aurigae> as are timers.
[19:58:54] <Lambda_Aurigae> read the datasheet
[19:59:13] <Lambda_Aurigae> if you want it all abstracted and done for you, go with arduino
[19:59:28] <Lambda_Aurigae> otherwise there are dozens of libraries out there to do everything you need.
[19:59:33] <Lambda_Aurigae> it is just a matter of finding them.
[19:59:56] <Lambda_Aurigae> http://www.procyonengineering.com/embedded/avr/avrlib/
[20:00:04] <Lambda_Aurigae> older but, libraries for many thingies.
[20:00:18] <tiblock> Lambda_Aurigae, on and off not hard, but i want PWM and timers and triggers for buttons and ADC. So...
[20:00:41] <Lambda_Aurigae> read the datasheet.
[20:00:49] <Lambda_Aurigae> it's all in there.
[20:01:03] <Lambda_Aurigae> there are many tutorials out there on the subject as well
[20:01:07] <Lambda_Aurigae> google is your friend.
[20:01:08] <tiblock> Lambda_Aurigae, there is like 800 pages of it and i just want practice in PCB making. Thank you for lib
[20:02:08] <Lambda_Aurigae> 800 pages?
[20:02:44] <Lambda_Aurigae> atmega1284p is only 372 pages.
[20:03:21] <tiblock> I was asking peoples and they gave me this 660 pages http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf
[20:03:50] <Lambda_Aurigae> yes, that is the datasheet for that series.
[20:03:56] <Lambda_Aurigae> considerably less than 800 pages.
[20:03:58] <tiblock> Anyway, thenk you for lib, i will use it
[20:04:00] <Lambda_Aurigae> full of tables
[20:04:09] <Lambda_Aurigae> full of code examples
[20:04:09] <tiblock> s/thenk/thank
[20:04:12] <Lambda_Aurigae> a good document
[20:04:34] <Lambda_Aurigae> avr datasheets are well written and very complete. better than other manufacturers by far.
[20:04:36] <rue_house> tiblock, there is a library
[20:04:37] <rue_house> called
[20:04:50] <Lambda_Aurigae> there is also avr-libc
[20:04:57] <Lambda_Aurigae> the standard c-lib for the avr
[20:05:05] <rue_house> what was that guys library called?
[20:05:07] <Lambda_Aurigae> not to be confused with procyon avrlib.
[20:05:18] <Lambda_Aurigae> rue_house, which one?
[20:05:25] <rue_house> lic also lets you use the eeprom and stuff
[20:05:31] <rue_house> prycon avrlib
[20:05:38] <rue_house> do you remember the name of it?
[20:05:39] <Lambda_Aurigae> rue_house, that's what I posted up there.
[20:05:43] <Lambda_Aurigae> procyon avrlib
[20:05:45] <rue_house> ok
[20:05:47] <Lambda_Aurigae> http://www.procyonengineering.com/embedded/avr/avrlib/
[20:05:52] <rue_house> cause yea
[20:05:54] <Lambda_Aurigae> by pascal stang
[20:06:01] <rue_house> if you can remember the name of it, its a good one
[20:06:07] <Lambda_Aurigae> old, not maintained, but still fun to use.
[20:06:22] <rue_house> its got a lot of stuff
[20:06:25] <Lambda_Aurigae> yup.
[20:06:29] <rue_house> tiblock, could also just use arduino
[20:06:36] <Lambda_Aurigae> wish he had kept it up but he moved on to ARM
[20:07:21] <tiblock> rue_house, too easy. I used ESP8266 before with LUA firmware and its too easy too. So i bought atmega clean chips. But C is over hard for me, never coded in C.
[20:07:34] <Lambda_Aurigae> C is not hard
[20:07:46] <rue_house> I'd bet you would find the most of the base arduino stuff is a mod on prycon avrlib
[20:07:56] <Lambda_Aurigae> I think what you are finding difficult is using the underlying hardware.
[20:08:13] <rue_house> tiblock, ooooh
[20:08:18] <rue_house> funny
[20:08:20] <rue_house> learn C
[20:08:36] <Lambda_Aurigae> "The C Programming Language" best book ever to learn C with in my opinion.
[20:08:44] <rue_house> everything real in the world in done with C
[20:08:47] <Lambda_Aurigae> the book written by the guys who wrote C in the first place.
[20:10:58] <Lambda_Aurigae> learning C and learning AVR are two totally separate things that can be very much intertwined.
[20:11:13] <tiblock> By the way here is my PCB. Firs time i made PCB. http://imgur.com/a/GzJnq
[20:11:30] <Lambda_Aurigae> one can program in C without touching AVR...one can program AVR without touching C...by mixing the two one makes things very fun indeed.
[20:14:24] <tiblock> Its firs version of it, i re-made it few times because of mistakes and improvements
[20:17:19] <Lambda_Aurigae> it's a growing experience.
[20:21:49] <Lambda_Aurigae> nobody I know of has made their first board without a problem or three.
[20:31:34] <Tom_itx> not too bad.
[20:31:43] <Tom_itx> the board wasn't clean before you etched it
[21:03:27] <rue_house> yea, I use SUPERFINE steel wool, and then give a hard cleaning with windex
[21:27:25] <rue_house> and you didn't quite let it finish etching
[21:27:35] <rue_house> tahts what the dark patches are
[23:42:28] <tiblock> I have question. I have ATmega328p and i want PCB with serial ports. I see that PD0=RXD and PD1=TXD and i have Ft232rl USB-UART thing and it has RX and TX. So what goes where? RXD to RX or to TX?
[23:51:19] <Casper> rx to tx