#avr | Logs for 2012-12-01

Back
[00:00:57] * rue_mohr releases a bag of crickets
[00:10:15] <Essobi> Anyone seen a weigand driver for AVR?
[00:10:28] <Essobi> In asm or C?
[00:10:43] <Essobi> rue_mohr: How're you?
[01:52:56] <Essobi> Sup
[07:27:21] <slidercrank> I'm trying to make my first board. So I currently have a led and a uC on the board. When I connect a usb programmer to the board, the led starts to glow (and it's on the PD0 pin). Is it okay? Does atmel8 provide power to it by default? Then when I invoke avrdude, the led flashes two times and continues to glow. Avrdude reports it couldn't connect.
[07:27:58] <slidercrank> *atmega8
[07:34:52] <OndraSter_> what programmer?
[07:38:53] <slidercrank> OndraSter, USBasp
[08:04:02] <jacekowski> slidercrank: all ports are off by default
[08:04:23] <jacekowski> slidercrank: is that between PD0 and gnd or PD0 and vcc?
[08:07:56] <slidercrank> PD0 is between "NOT RESET" and PD1
[08:09:44] <slidercrank> PD0 is pin number one in atmega8
[08:10:16] <slidercrank> *number two
[08:26:56] <jacekowski> i'm asking about diode
[08:26:58] <jacekowski> where is it connected
[08:27:09] <jacekowski> between PD0 and gnd or vcc?
[08:28:57] <slidercrank> jacekowski, PD0-> resistor -> LED -> GND
[08:32:50] <OndraSter> *ahem* no programmer should supply power
[08:33:14] <Horologium> Essobi, what is a "weigand driver"
[08:33:18] <slidercrank> OndraSter, the programmer I use supplies
[08:33:32] <slidercrank> OndraSter, it has a Vcc pin next to MOSI
[08:33:40] <OndraSter> that should be actually Vtarget
[08:33:50] <OndraSter> and it should be reading the voltage and/or setting output transistors on the programmer
[08:34:16] <OndraSter> why? Because the target can not know what is the target voltage it should supply - if you let 5V into xmega you will burn it :)
[08:34:21] <slidercrank> http://www.noodlehed.com/ebay/pics/usbasp_pinout.jpg my programmer
[08:34:39] <OndraSter> Vtg = Vtarget
[08:35:08] <slidercrank> this programmer is configurable. it can work as 5V and 3.3V power source
[08:35:25] <OndraSter> I still stand behind my words
[08:35:30] <OndraSter> programmer should not supply any voltage :P
[08:37:31] <slidercrank> OndraSter, I'm not sure what you mean. Do I misuse the programmer? I can read +5.14V between Vtg and GND on the programmer
[08:37:42] <OndraSter> yeah well that shouldn't be happening :)
[08:37:57] <OndraSter> anyway
[08:37:59] <OndraSter> use it as you want
[08:38:26] <slidercrank> OndraSter, without power supply from the programmer I should care about finding another power source
[08:38:42] <OndraSter> yes
[08:39:01] <slidercrank> and it's possible to use another source. Then I'll have to disconnect the Vtg pin
[08:39:39] <OndraSter> yes
[08:40:33] <OndraSter> chmpf
[08:40:33] <OndraSter> http://pastebin.com/4hjwYCHz
[08:40:46] <OndraSter> I have stripped my code as much as I could
[08:40:53] <OndraSter> but it *still* resets the device somewhere during enumeration
[08:42:53] <jacekowski> OndraSter: a lot of programmers supply power
[08:43:13] <jacekowski> OndraSter: all better programmers have selectable supply
[08:43:20] <jacekowski> either from programmer or from target
[08:43:37] <OndraSter> why should they supply power?
[08:43:44] <jacekowski> for ISP
[08:43:53] <OndraSter> for ISP you still use the main power input
[08:43:57] <jacekowski> not always
[08:44:04] <OndraSter> what Atmel officiall programmers do that?
[08:44:09] <jacekowski> all of them
[08:44:10] <OndraSter> which*
[08:44:16] <jacekowski> all of them have it selectable
[08:44:48] <OndraSter> I don't remember seeing it on Dragon nor AVRISP mkII
[08:45:06] <OndraSter> Dragon has got special vcc/gnd output, but it does not output to the Vtg pin
[08:45:58] <jacekowski> http://www.atmel.com/images/doc0943.pdf
[08:46:18] <jacekowski> . Alternatively, the target system can be supplied from the programmer at
[08:46:18] <jacekowski> programming time, eliminating the need to power the target system through its regular power
[08:46:21] <jacekowski> connector for the duration of the programming cycle.
[08:46:36] <OndraSter> I see
[08:47:36] <jacekowski> but that's a design decision
[08:47:44] <jacekowski> if you want your device to be supplied from programmer
[08:47:48] <jacekowski> or programmer supplied from device
[08:47:55] <jacekowski> or each device with it's own supply
[08:48:48] <jacekowski> supplying from programmer means that you only need one cable to program the device
[08:48:55] <jacekowski> but amount of power supplied is limited
[08:49:36] <jacekowski> but if your device has non isolated power supply, then that's the only way probably
[08:49:43] <jacekowski> otherwise stuff would be blowing up
[08:49:58] <jacekowski> but if you for example use jtag to program your stuff
[08:50:02] <jacekowski> and device is big
[08:50:10] <jacekowski> then you probably need external power
[08:50:24] <jacekowski> and you probably are using jtag to test whole thing at the same time
[08:50:40] <jacekowski> as in, boundary scan
[08:52:27] <Malinuss> putting definitions into .h file. Is that sane or not? I only have one function and some global variables, I'm not all that used to not OOP programming hehe
[08:53:01] <slidercrank> Vcc (+5V) ---- (A)---Resistor (10kOhm) ----(B) ---- Not RESET pin of the uC. At what point (A or B) should the Not RESET pin of the programmer be connected ?
[08:53:30] <slidercrank> I currently soldered it to the B point
[08:55:52] <slidercrank> Malinuss, I see nothing wrong with putting defs to a .h file. It's a common practise
[08:56:33] <Malinuss> slidercrank, idk. normally I would just put the declerations in .h and definitions in c...
[08:58:19] <Horologium> stk500 also supplies power.
[08:58:21] <slidercrank> declarations in .h??? Do you mean char c; int a=10 and so on?
[08:59:38] <Malinuss> yes slidercrank
[08:59:50] <Malinuss> at least that's what you do in OOP code
[08:59:59] <slidercrank> no, that's wrong
[09:00:03] <slidercrank> even in OOP
[09:00:35] <Malinuss> well normally you wouldn't have seperate files for a single variable, and no globals at all. but I thought you've got the point
[09:00:49] <slidercrank> in .h files you normally write stuff like "#define PI 3.14" or specify function prototypes
[09:01:00] <Malinuss> yeah
[09:02:11] <slidercrank> jacekowski, could you answer my question about the connection point?
[09:05:53] <r00t|home> Malinuss: i'd say, anything that actually generates code or data compiler output goes in .c
[09:06:14] <Malinuss> r00t|home, okay good ;D
[09:06:42] <slidercrank> r00t|home, yes, that would be in the ideal world
[09:06:45] <r00t|home> Malinuss: as in "extern int i;" goes in .h, "int i;" goes in .c
[09:06:56] <r00t|home> slidercrank: it would also be the only sane thing? :P
[09:07:18] <slidercrank> r00t|home, unfortunately when you use templates, gcc is faulty about their implementation and you have to put your code to .cpp
[09:07:21] <slidercrank> *to .h
[09:07:34] <Malinuss> hmm
[09:08:17] <slidercrank> Malinuss, but you write in pure C and definitely don't use templates. So code must go to .C and definitions and prototypes to .h
[09:09:21] <Malinuss> OndraSter_, finally found some code that would allow me to simply use the USB to send debug messages (it makes it into a HID device), and uses as little memory as posible (only 1kb)
[09:10:03] <theBear> slidercrank, your question doesn't really make sense
[09:10:04] <Malinuss> OndraSter_, also much easier then using the whole bloated LUFA library... because it's only a single .h and .c file..
[09:10:19] <slidercrank> theBear, why?
[09:10:22] <Malinuss> theBear, I think you mean *my question*?
[09:10:29] <theBear> oh, you don't mean not-reset pin, you mean inverted reset pin ?
[09:10:33] <theBear> Malinuss, i do not
[09:10:34] <Malinuss> oh wait nvm. hehe
[09:10:44] <slidercrank> theBear, I currently use this scheme: the current scheme: Vcc (+5V) -------Resistor (10kOhm) ----(connection point from the Not RESET of the programmer) ---- Not RESET pin of the uC
[09:11:07] <theBear> yep, still doesn't make sense, wtf is "Not RESET" ?
[09:11:16] <slidercrank> the name of the pin
[09:11:31] <theBear> eh ? an avr has a "Not RESET" pin ?
[09:11:45] <Malinuss> OndraSter_, just though you might be interested since we have been talking about it, and you've made your own usb stack etc.
[09:11:45] <slidercrank> it's RESET with a line over it
[09:11:51] <OndraSter_> Malinuss, link?
[09:12:01] <OndraSter_> slidercrank, the pin is still called RESET ;D
[09:12:03] <theBear> yeah, reset with a line over it is inverted logic RESET, or on an avr, just reset
[09:12:06] <OndraSter_> it is just low-active
[09:12:37] <theBear> and Not, well that means nothing in ANY context... NOT means something, Not, does not, unless it is a proper-noun
[09:13:07] <slidercrank> I used "not" to mean inversion
[09:13:10] <theBear> so, umm, to sum up, you want a 10k pullup from reset to vcc with an avr
[09:13:20] <slidercrank> that's how it's called in boolean algebra
[09:13:23] <theBear> then why did you capitalise it, or use the term not ?
[09:13:49] <Malinuss> OndraSter_, http://www.pjrc.com/teensy/blinky.zip you want to look at the usb_debug_only.h / .c
[09:14:11] <slidercrank> theBear, to make it clearer (I hoped so)
[09:14:32] <theBear> obviously not, and well, i dunno how you do at english/comprehension, but a capitalised first letter means certain things
[09:14:38] <slidercrank> theBear, to underline that logic of the uC and the programmer match
[09:15:43] <r00t|home> slidercrank: in that case you'd say "active low", not "not" and even less "Not"
[09:15:55] <slidercrank> okay
[09:16:36] <slidercrank> So my current sheme is the following: Vcc (+5V) -------Resistor (10kOhm) ----(connection point from the low RESET of the programmer) ---- low RESET pin of the uC (amega8). Is it correct?
[09:17:20] <r00t|home> slidercrank: you mean, you have a pullup on reset?
[09:18:33] <OndraSter_> thanks Malinuss
[09:19:49] <Malinuss> OndraSter_, hehe I was not sure if you would even be interested. Can you even use it for anything? Also of course, you need a special program to "listen" to the output from the HID, which is at least as complicated as the stack for the uC
[09:19:55] <slidercrank> r00t|home, yes
[09:20:22] <r00t|home> slidercrank: if you connect the reset output to vcc, you will most likely blow up your programmer ;)
[09:20:38] <r00t|home> slidercrank: (just scrolled up to read your question)
[09:20:39] <OndraSter_> Malinuss, well I am not using HID I am using CDC
[09:20:42] <OndraSter_> they differ a bit
[09:20:52] <OndraSter_> and the USB works a bit different on mega and xmega
[09:20:55] <OndraSter_> (well, a lot different)
[09:20:57] <Malinuss> OndraSter_, very much. CDC = COM, right?
[09:21:11] <r00t|home> slidercrank: the programmer would short-circuit the uC's power supply... that might be a working way to reset it, but the reset output surely can't drive that much current ;)
[09:21:16] <OndraSter_> yes
[09:22:02] <Malinuss> OndraSter_, yeah well the cdc is much better, because you can easliy send messages back and forth, and read it with bascially anything... This is much more limiting, but only 1.2kb :)
[09:22:22] <OndraSter_> I have got around 4kB I can use for the USB stack :)
[09:22:27] <OndraSter_> so I am not worried about space
[09:22:47] <slidercrank> r00t|home, oh, right. So my connection is correct
[09:26:44] <OndraSter_> chmpf
[09:26:49] <OndraSter_> I connect my device to laptop - works
[09:26:50] <OndraSter_> reset - works
[09:26:53] <OndraSter_> reset - works still
[09:26:56] <OndraSter_> connect to my PC - works
[09:27:02] <OndraSter_> reset - does not enumerate fully
[09:27:04] <r00t|home> slidercrank: also, unless building a production device maybe, you don't need the external pullup on reset
[09:27:05] <OndraSter_> reset - does not enumerate at all
[09:27:25] <Malinuss> OndraSter_, well you are using a Xmega, you have more then enough space hehe.
[09:27:33] <OndraSter_> well I need to fit USB partition :)
[09:27:36] <OndraSter_> that is 8kB
[09:27:44] <Malinuss> USB partition? for what?
[09:27:47] <OndraSter_> err
[09:27:48] <Malinuss> the SD card?
[09:27:50] <OndraSter_> bootloader partition
[09:27:54] <Malinuss> oh
[09:28:05] <OndraSter_> ~4kB for USB stack, 2kB for ISP and then another 2kB for bootloader self-updating option
[09:28:06] <Malinuss> well I thought the Xmega had built-in bootlader space
[09:28:10] <OndraSter_> it does
[09:28:13] <OndraSter_> 128kB + 8kB
[09:28:17] <OndraSter_> but it does not ship with bootloader
[09:28:30] <Malinuss> well I know, but you just use the 8kB then
[09:28:37] <Malinuss> should just be enough hehe
[09:28:39] <OndraSter_> yes
[09:28:46] <OndraSter_> that is why I went for this bigger chip
[09:28:54] <OndraSter_> 128+8 / 8 vs 32+4/4
[09:28:59] <OndraSter_> (flash/RAM)
[10:03:13] <RikusW> http://www.hizook.com/blog/2010/12/07/electropermanent-magnets-programmable-magnets-zero-static-power-consumption-enable-s
[10:05:09] <slidercrank> r00t|home, could you, please, take a look at this simple schematic? http://rghost.net/41935730/image.png that's my wiring. I get +5V from Vtg of the programmer. Is everything okay?
[10:06:02] <slidercrank> for some reason avrdude doesn't see my uC. But when it tries to access it, the led blinks twice
[10:09:33] <Tom_itx> how big is the reset resistor?
[10:09:45] <slidercrank> 10kOhm
[10:09:55] <Tom_itx> you should have caps on hte crystal
[10:09:57] <Tom_itx> 22pf
[10:10:13] <slidercrank> I'm not using a crystal at the moment
[10:10:36] <slidercrank> I have a 16MHz and two 22pf caps. But I haven't soldered them yet
[10:10:54] <slidercrank> I want to use an internal oscillator for now
[10:11:18] <slidercrank> *a 16MHz crystal
[10:11:27] <Tom_itx> maybe these messages will offer some help: http://tom-itx.dyndns.org:81/~webpage/usbtiny_programmer/testing_index.php
[10:11:37] <Tom_itx> different stages of 'connected'
[10:12:32] <Tom_itx> double check your wiring
[10:12:44] <OndraSter_> ARRRGH
[10:12:45] <Tom_itx> and if it's a breadboard, use a meter to check it
[10:12:47] <OndraSter_> why IT IS SO RANDOM!
[10:12:55] <Tom_itx> OndraSter_ why wouldn't it be?
[10:12:57] <OndraSter_> it once in a 40 tries connects to PC just fine
[10:13:01] <Tom_itx> anybody could find it then
[10:13:07] <OndraSter_> on laptop it works *always*
[10:13:14] <OndraSter_> on my sister's laptop it is the same as on my PC
[10:13:24] <OndraSter_> shall I call it "6 years old AMD USB chipsets compatible only"?
[10:13:50] <RikusW> ugh
[10:14:42] <OndraSter_> all the descriptors are the same as on the atmel's usb stack..
[10:14:44] <OndraSter_> WHAT COULD IT BE
[10:15:01] <OndraSter_> I am tempted to go back to atmel's code and strip it to the barest bone :/
[10:15:03] <RikusW> some weird timing issue ?
[10:15:04] <OndraSter_> but it is just... SO LONG
[10:15:18] <OndraSter_> well xmega does it all on its own... I don't see any space for timing issue :/
[10:15:25] <OndraSter_> even when I disable dumping code to UART
[10:17:06] <RikusW> my code isn't that long, but its asm...
[10:17:47] <OndraSter_> well I have got a lot of mega implementations of USB
[10:17:56] <OndraSter_> but the xmega differs in the parts that I can't easily debug :(
[10:17:58] <OndraSter_> (aka timing)
[10:18:46] <RikusW> and usb enumeration fails if there is a breakpoint....
[10:18:55] <OndraSter_> exactly
[10:19:00] <OndraSter_> that is why I am dumping code to UART
[10:20:13] <OndraSter_> the only thing that differs my PC from my laptop in software is Win8 x64 on laptop..
[10:20:19] <OndraSter_> I don't have any W8 machine around here
[10:23:16] <RikusW> and it works on win8 but on 7 ?
[10:23:31] <OndraSter_> but not on 7, yes
[10:23:37] <OndraSter_> on 7 only randomly :D
[10:23:49] <OndraSter_> too bad my other laptop can not run W8
[10:24:11] <OndraSter_> and I am not reinstalling/upgrading OS on my PC till I get SSD
[10:25:05] <RikusW> and XP ?
[10:25:32] <OndraSter_> I am not sure if I have got any working one around here
[10:25:58] * RikusW didn't even know Electropermanent Magnets existed
[10:27:25] <RikusW> those will make a nice low power relay
[10:36:00] <OndraSter_> hmm on XP it does not work either
[10:37:30] <RikusW> try win98 :-P
[10:37:39] <RikusW> or win95 :-D
[10:37:48] <RikusW> but win95 got poor USB support...
[10:39:17] <OndraSter_> I don't have drivers for it for Win98 :D
[10:39:24] <OndraSter_> usbser.sys?
[10:40:04] <RikusW> iirc I did test U2S on win98
[10:40:09] <OndraSter_> yay
[10:40:12] <OndraSter_> nice
[10:40:32] * RikusW got XP 98 and Debian on this PC ;)
[10:40:38] <RikusW> triple boot
[10:40:52] <RikusW> though 98 don't get booted up anymore...
[10:41:02] <OndraSter_> :D
[10:41:20] <OndraSter_> huhm the USB_CDC_SAMPLE with the UART and USB ASF stuff has got with optimizations on max 12kB!!
[10:41:21] <OndraSter_> crazy
[10:41:34] <RikusW> That was for getting VS97 help to work, and now I have the XP fix, so I wont install 98 again in future...
[10:54:47] <slidercrank> al1ta, ciao
[10:55:46] <slidercrank> I have this question. Am I right assuming that MOSI of the programmer should be connected with MOSI of the uC? That is they have a direct connection and not crossover? The same about MISO
[10:59:31] <RikusW> yes
[10:59:37] <RikusW> master out slave in
[10:59:49] <RikusW> programmer is the master and avr the slave
[11:00:11] <slidercrank> thanks
[11:01:21] <RikusW> with jtag you got tdi and tdo (mosi = tdi tap data in)
[11:01:39] <RikusW> jtag got one more line TMS which is used to control the state machine
[11:17:24] <Bustamove> if i got a 50hz PWM pulse how do i know which should be in OCR0A = 5000; // 40000 * 0.05 most left
[11:18:06] <Bustamove> this code works but 2000 is left and 5000 is right.. i want to know where 1ms and 2ms pulse is
[11:20:25] <OndraSter_> OCR = "duty cycle"
[11:20:27] <OndraSter_> in PWM mode
[11:20:32] <OndraSter_> or do you mean in CTC mode?
[11:20:34] <OndraSter_> afk
[11:24:10] <Bustamove> PWM mode.
[11:26:05] <Bustamove> soo ocr 1000 == 1ms delay then?
[11:26:39] <RikusW> 1000 timer tick delay
[11:27:09] <Bustamove> ah
[11:27:32] <RikusW> you'll have to configure the timer divider, and use that to calculate tick frequency
[11:27:44] <Bustamove> its set up to 50hz
[11:28:02] <RikusW> 1000 ticks = 20s then
[11:28:07] <Bustamove> Sec?
[11:28:14] <RikusW> yes
[11:28:22] <RikusW> are you sure its 50Hz ?
[11:28:22] <Bustamove> no way how can my servo work then
[11:28:40] <Bustamove> //(16000000 / 8 / 40000 = 50hz)
[11:29:21] <RikusW> where does the 40000 come from ?
[11:29:30] <Bustamove> ICR1 = 40000; //set ICR1 to produce 50Hz frequency
[11:29:37] <Bustamove> thats the counter right
[11:30:01] <RikusW> ah so your top value is 40k
[11:30:19] <RikusW> that timer is running at 2MHz
[11:30:30] <Bustamove> oh i see
[11:30:35] <RikusW> so 20000 ticks is 1ms
[11:30:40] <RikusW> err 2000
[11:31:41] <Bustamove> Alright thank you one more thing a OC0A pin got the specific OCR0A right
[11:32:25] <RikusW> you need to setup TCCR1A iirc
[11:32:35] <RikusW> that controls the outputs
[11:33:01] <RikusW> (off high low toggle)
[11:34:04] <Bustamove> so for TCCR1A i need to use OCR1A and not OCR0A
[11:34:35] <Bustamove> and TCCR1A got a specific pin output(s)?
[11:37:54] <RikusW> OCR1A
[12:04:57] <JohK> hi
[12:04:59] <OndraSter_> hi
[12:07:12] <JohK> I want to send IR-commands from within a LabVIEW programm. My Plan is to use v-usb on an atmega8 and use the irsnd package of the german mikrocontroller.net-board
[12:07:44] <JohK> But I haven't done anythig with USB so far, and I lack the overview...
[12:08:23] <OndraSter_> USB!!
[12:08:25] <OndraSter_> QUICKLY, HIDE!
[12:08:27] <JohK> can someone point me at the right direction at which kind of USB device I should set up, so I don't have to programm a windows driver?
[12:08:34] <JohK> OndraSter_: ... :)
[12:08:48] <OndraSter_> screw V-USB
[12:08:59] <OndraSter_> how much does atmega8 cost?
[12:09:14] <OndraSter_> I'd suggest getting (at least) atmega88 - at8 is the olldd series and hard to get
[12:09:17] <OndraSter_> maybe even more expensive
[12:09:17] <JohK> OndraSter_: no idea I have it available
[12:09:19] <OndraSter_> ah
[12:09:43] <OndraSter_> "parts bin in my drawer"
[12:09:46] <JohK> I actually have it all setup on my breadboard already
[12:10:23] <JohK> question is mainly what USB device should I use, so I can basically just send it a few bytes from labview without the need for a windows driver
[12:10:56] <OndraSter_> and what will it do?
[12:11:34] <JohK> just encode the command for a micro-hifi and tell it via usb to start playing the radio
[12:11:52] <JohK> but all that encoding part is already there with the IRSND project
[12:12:27] <JohK> so I need to give it data in the order of maybe 4-10 bytes
[12:13:08] <OndraSter_> so the PC will be sending data TO the IR?
[12:13:18] <JohK> yes
[12:13:49] <OndraSter_> oh
[12:13:50] <OndraSter_> hmm
[12:14:00] <OndraSter_> well Ir = UART
[12:14:05] <JohK> yep seems like everyone else likes to receive data
[12:14:06] <JohK> ehm
[12:14:07] <JohK> no
[12:15:13] <JohK> I haven't found any examples of USB devices that mainly receive data from their host
[12:16:40] <OndraSter_> usb cdc?
[12:16:44] <OndraSter_> but it is not per specifications
[12:16:48] <OndraSter_> cdc requires fullspeed device
[12:17:52] <JohK> http://www.recursion.jp/avrcdc/
[12:17:55] <JohK> this sounds nice
[12:18:25] <JohK> uh they patch the windows driver
[12:18:47] <JohK> OndraSter_: have you got experience with HID?
[12:41:12] <rue_mohr> hmm?
[12:42:16] <rue_mohr> Hardly Intelligent Device ? is it possable not to have experiance?
[12:43:04] <theBear> lol, i don't think anyone has had experiAnce in the history of the planet :)
[12:43:43] * rue_mohr dumps a bucket ov vowels over theBear
[12:44:18] <rue_mohr> :)
[12:48:00] <rue_mohr> how are you today theBear ?
[12:48:24] <rue_mohr> see if I can take in all the recycling today
[13:04:30] <theBear> ya know, medium, good side of medium maybe :)
[13:05:26] <Tom_itx> medium rare?
[13:06:52] <Horologium> got 20 pounds of MEAT in the fridge I need to cut up.
[13:15:47] <OndraSter_> Horologium, bbq party?
[13:16:04] <Horologium> thought about it.
[13:16:08] <Horologium> wifey won't let me.
[13:16:11] <OndraSter_> eh
[13:16:18] <Horologium> got rump roast for 2.00 per pound.
[13:16:20] <OndraSter_> "does this smell like a chloroform to you?"
[13:17:06] <Horologium> she might poison my fried chicken next week if I did that.
[13:17:28] <OndraSter_> :D
[13:18:08] <Horologium> think I'm gonna go look at my "new" sander..
[13:18:17] <Horologium> see what I need to put it together.
[13:19:52] <slidercrank> It works! I grounded AGND in addition to GND and it f-ng started working!!!!
[13:21:06] <Tom_itx> well you _DO_ need to do that
[13:21:22] <Tom_itx> and tie Avcc to +5 if unused
[13:22:03] <Tom_itx> so what did we learn from this exercise?
[13:22:52] <slidercrank> Tom_itx, well, I watched lots of tutorials and they didn't ground AGND and didn't supply voltage to AVCC
[13:23:04] <slidercrank> and if they did, they hid it.
[13:23:14] <Tom_itx> then they were wrong in doing so
[13:23:25] <slidercrank> but it worked for them
[13:23:36] <Tom_itx> there's always a lucky few
[13:24:16] <slidercrank> Now I can start complicating my scheme. Adding buttons and other chips.
[13:24:22] <theBear> generally any gnds or supply voltages should be connected on a chip of any kind
[13:25:05] <slidercrank> The guy who gifted an atmega8 said it was not necessary. That "gnd and agnd are connected internally". So only one gnd is enough
[13:25:36] <slidercrank> heh
[13:26:23] <slidercrank> btw, thank you all. This channel is awesome
[13:26:39] <Tom_itx> he is dead wrong
[13:26:51] <Tom_itx> if there are 2 external GND pins they BOTH must be connected
[13:26:56] <Tom_itx> some have many
[13:27:09] <Tom_itx> they ALL must be connected
[13:27:40] <theBear> yerp, what tom and me said :)
[13:28:07] <theBear> for a start, we can give this information in non-video form, and that alone proves we're more intelligent and practical and serious than any of those other guys
[13:28:28] <slidercrank> http://www.pocketmagic.net/wp-content/uploads/2009/02/atmega8.png look here. AGND is not grounded for some reason
[13:28:46] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[13:28:54] <Tom_itx> look there
[13:28:56] <Tom_itx> it is
[13:29:06] <Tom_itx> but not necesarily avcc
[13:29:23] <Tom_itx> not grounding it will cause stray noise inside the chip
[13:29:33] <r00t|home> what's really annoying is that you need the cross the gnd/vcc trace to connect them on both sides of the chip...
[13:29:35] <Tom_itx> or possibly oscillations
[13:29:59] <Tom_itx> besides, who would argue with theBear
[13:30:16] <r00t|home> if the pins were next to eachother, nobody would ever bother not to connect them
[13:35:41] <OndraSter_> r00t|home, well AVCC should be filtered through a choke :P
[13:36:07] <OndraSter_> btw am I the only one who uses bottom layer as GND with one thick trace for VCC?
[13:36:19] <OndraSter_> and sometimes some pieces of regular GPIO itself
[13:42:00] <theBear> hehe, and yeah, sometimes (like OndraSter_ mentions) you wanna do 'special' things to avcc/agnd to avoid digital noise from other parts of the circuit
[14:13:26] <Vutral> uhm
[14:13:46] <Vutral> reading a digital input on atmega328p ? over PINB ?
[14:13:49] <Vutral> or PORTB ?
[14:16:03] <Horologium> PINB
[14:17:44] <Horologium> slidercrank, AGND is the ground for the analog to digital converter....it really should be grounded, even if you don't use the ADC.
[14:25:45] <froggyman> so I just installed a 14.7456MHz crystal onto my Atmega32... It appears to be set up correctly in hardware. Now I know I need to change some fuse bits around for it to actually use the crystal. But the online calculator I was using looks rather daunting, and I'm afraid of bricking my atmega32.... any help?
[14:27:05] <slidercrank> Horologium, yes, I figured that now
[14:27:26] <Bustamove> froggyman there is only one calculator out there i believe
[14:27:33] <Bustamove> engmbedded
[14:27:36] <Bustamove> works fine
[14:28:39] <Bustamove> select your device and choose external crystal
[14:28:53] <Bustamove> untick divide by 8 so it runs at full speed
[14:29:28] <slidercrank> Bustamove, it's funny to see you with this nick. I used to practise break-dance in a group named "Bust a move"
[14:29:49] <Bustamove> :) great song and awesome game too
[14:31:31] * froggyman thinks he has it
[14:32:13] <slidercrank> who sings it?
[14:32:13] <Bustamove> be sure to not pick Ect. Clock!
[14:32:24] <Bustamove> Young MC "Bust a move"
[14:32:44] <Bustamove> External crystal is the way to go
[14:35:18] <froggyman> what the....
[14:35:31] <froggyman> hmm... now I can't seem to be able to talk to my atmega32
[14:35:48] <froggyman> ran this first "avrdude -c usbtiny -p m32 -U lfuse:w:0b11101111:m"
[14:36:02] <froggyman> then, when I tried to do the hfuse.... it says cannot intialize
[14:37:04] <Bustamove> i usually do them at the same time htm
[14:37:16] <Bustamove> You didnt pick "ext. clock" right
[14:37:19] <Vutral> main.c:450: error: 'NULL' undeclared (first use in this function)
[14:37:21] <Vutral> o_O
[14:37:29] <Vutral> w t f
[14:37:32] <Vutral> lol !?
[14:37:42] <Bustamove> LOLOLOLO
[14:38:10] <froggyman> Bustamove: are you sure?
[14:38:18] <Vutral> so how do i tell it NULL
[14:38:18] <Bustamove> froggyman of what
[14:38:20] <Vutral> ^^
[14:38:30] <froggyman> Bustamove: that i didn't pick my ext. clock right?
[14:38:57] <Bustamove> i asked if you picked external crystal and not ext. clock option in the dropdown
[14:39:48] <Bustamove> do you have the crystal setup with capacitors?
[14:40:21] <Vutral> #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
[14:40:23] <Vutral> lol ?
[14:40:31] <Bustamove> easyfix
[14:40:43] <Bustamove> you need a -O0 tag or something
[14:40:47] <Bustamove> o/
[14:40:56] <froggyman> I did pick the external crystal. Something might be wrong with my wiring though
[14:40:57] <Bustamove> on gcc compiler
[14:41:36] <Tom_itx> use a morse code teletype buttton for a clock
[14:42:26] <Bustamove> i use two 20pF capacitors for my crystal without em it wont start
[14:42:44] <froggyman> I have two 22pf caps on it
[14:43:44] <froggyman> the crystal should be non directional, right?
[14:48:00] <Tom_itx> yes
[14:48:18] <froggyman> ah... turns out i have a small little solder bridge between the two clock pins
[14:48:49] <Tom_itx> solder is a good conductor
[14:49:26] <Bustamove> Tom_itx whats wrong with you LOL
[14:50:44] <Tom_itx> gotta take things lightly
[14:56:23] <froggyman> huzah!
[14:56:37] <froggyman> now my LED cube's animations run a bit faster
[14:56:58] * froggyman would guess that they run about 14.7456X faster
[15:01:07] <slidercrank> froggyman, 256 leds?
[15:01:15] <froggyman> 512
[15:01:15] <slidercrank> oh, 512
[15:01:17] <froggyman> 8x8x8
[15:01:23] <slidercrank> yeah, I remember you
[15:01:34] <slidercrank> did it take you 8 hours to solder all leds?
[15:01:40] <slidercrank> *all the leds
[15:01:40] * froggyman isn't sure if that's good or bad
[15:01:54] <Malinuss> Yay I've finally made my "hid debug interface", both take string and integers!
[15:02:13] <Malinuss> took some time to figure out how to go from a integer -> char string, hehe
[15:02:17] <froggyman> slidercrank: yeah... somewhere around there
[15:02:30] <froggyman> here's a video of its first run if you're interested: https://www.facebook.com/photo.php?v=10200161233781698
[15:02:43] <slidercrank> I'm interested
[15:03:24] <slidercrank> not bad:)
[15:03:25] <Malinuss> froggyman, oh that's awsome. What do you use to control it? Also, any pictures to show how the matrix is assambled?
[15:04:04] <froggyman> here are a few more pics of it: https://www.facebook.com/media/set/?set=a.10200155455917255.195150.1476848579&type=1
[15:04:12] <froggyman> It's just a standard multiplexed setup
[15:04:24] <froggyman> I use 8 74HC595 shift registers to control it.
[15:04:39] <froggyman> data is stored in a 2D byte array, where each bit represents an LED
[15:05:24] <Malinuss> froggyman, what about the deptht?
[15:05:58] <froggyman> the byte array takes care of z and y, the bits in the byte take care of the x
[15:06:17] <Malinuss> oh, that's clever
[15:08:13] <froggyman> it makes writing to the shift registers dead simple
[15:08:39] <froggyman> just assign cube [z] [y] to the port connected to the shift registers and loop
[15:13:43] <froggyman> hmm... setting up a timer on the arduino was much easier.
[15:17:08] <Malinuss> froggyman, really?
[15:17:19] <Malinuss> froggyman, I found it easier to do with plain timers
[15:18:21] <froggyman> I thought it was
[15:19:45] <Malinuss> froggyman, simply using a overflow timer is pretty, yeah, simple :)
[15:19:58] <Malinuss> froggyman, which "timer" function do you use from arduino?
[15:20:03] <froggyman> Timer1
[15:21:11] <Malinuss> I can't really understand how that's easier ;P
[15:37:39] <Vutral> how do you find the start of a frame
[15:41:57] <Malinuss> Vutral, frame?
[15:42:44] <Vutral> yes
[15:43:29] <Malinuss> what do you mean, "frame"?
[15:45:17] <Malinuss> Vutral, you need to be more specific, what do you mean by a "frame"?
[15:46:47] <Vutral> Malinuss: i got a serial transmission
[15:46:53] <Vutral> but i need to find the start of a frame
[15:47:00] <Vutral> a frame is a struct more or less ^^
[15:47:05] <froggyman> ,,,
[15:47:10] <Vutral> but i need to slide over the data on the serial conneciton in my buffer
[15:47:14] <Vutral> looking for its start
[15:50:42] <froggyman> Malinuss: I had the timer set up correctly.... On the interrupt I had a currentLayer variable that got incremented by 1 every run, and was supposed to have it reset to 0 when it was 8... but had currentLayer == 0
[15:50:44] <froggyman> >.<
[15:50:50] <froggyman> instead of currentLayer = 0;
[15:53:50] * froggyman makes that mistake way too often
[15:54:20] <mark4_> anyone seen rikus? if im remembering how to spell his nicl=k right lol
[15:54:59] <Malinuss> froggyman, haha I've did something similar, when I by mistake had a if(i = x) instead of == haha
[15:55:12] <froggyman> I've done that too
[15:55:19] <froggyman> haha
[15:55:22] <OndraSter_> if "=" vs "==" was my biggest issue in my code..
[15:55:29] <OndraSter_> I hate stuff that "just does not work"
[15:55:52] <mark4_> thats a very common mistake. i actually think its a flaw in the c language that = and == are so similar. there should be a "==" that doesnt have an equals sign in it
[15:56:06] <OndraSter_> eh
[15:56:11] <froggyman> right now I try to write my boolean expressions as "boolean/number == variable" so if i place an = there it doesn't compile
[15:56:35] <froggyman> then if (true = x) simply won't compile
[15:56:41] <mark4_> if (1 == x) is a common technique but it doesnt work for variables (if x == y)
[15:56:48] <froggyman> true
[15:56:53] <OndraSter_> 1 == x?
[15:56:55] <OndraSter_> that is Yoda expression :)
[15:57:04] <mark4_> the other option is to -wall -werr and make sure (x = 1) is a warning
[15:57:37] <mark4_> OndraSter_: no not reverse polish. its a guard against unintentionally setting a variable your trying to test
[15:57:51] <mark4_> you cant set the value of 1 to the value of x
[15:57:51] <OndraSter_> oh
[15:57:55] <OndraSter_> no you can't
[15:57:58] <OndraSter_> BUT IT IS YODA expression!
[15:58:03] <mark4_> except in forth
[15:58:21] <mark4_> 2 constant 1 is a perfectly legal expression in forth and it defies 1 as being equal to 2 :P~
[15:58:24] <mark4_> i win!
[15:58:37] <OndraSter_> “Yoda Conditions”— the act of using if(constant == variable) instead of if(variable == constant), like if(4 == foo). Because it’s like saying “if blue is the sky” or “if tall is the man”.
[15:58:38] <OndraSter_> :P
[15:59:28] <mark4_> OndraSter_: i actaully have a theory about yoda speak. industrial light and magic who did the starwars SFX used forth alot. i think yoda speak is very forth ish
[15:59:31] <mark4_> RPN
[16:00:29] <mark4_> kinda need to get hold of rikus, he has this magic direct download link for the avr development suite where you dont have to register and sign up for endless spam from atmel
[16:00:51] <mark4_> and is avr studio 6 another incantation of microsofts abomination of an IDE?
[16:00:59] <OndraSter_> atmel studio 6*
[16:00:59] <OndraSter_> yes
[16:01:01] <OndraSter_> it uses VS2010
[16:01:03] <OndraSter_> shell
[16:01:04] <mark4_> ugh
[16:01:11] <mark4_> i think ill stick with AS4 then
[16:01:44] <slidercrank> OndraSter_, there is a reason for Yoda Conditions
[16:02:08] <mark4_> which we covered already lol
[16:02:24] <slidercrank> oh, I did read the whole history
[16:02:29] <mark4_> which IDE do most people in here use nowadays ? :)
[16:02:37] <specing> vim
[16:02:39] <slidercrank> vim + makefile
[16:03:07] <OndraSter_> Atmel Studio 6
[16:03:32] <mark4_> vi and its derivatives are HORRIBLE, the ONLY "Secape shift alt backspace backspace f10" type key sequence i will ever learn is "escape colon q bang"
[16:03:48] <OndraSter_> you forgot !
[16:03:53] <OndraSter_> if you accidentaly entered something :D
[16:04:01] <mark4_> in *nicx i use joe or more often now i use sublime text 2 which i regged
[16:04:17] <OndraSter_> if I have to bear *nix I use nano
[16:04:18] <mark4_> q bang = quit without saving.
[16:04:24] <OndraSter_> ah
[16:04:31] <mark4_> OndraSter_: nano does not have undo. check out joe
[16:04:35] <OndraSter_> too bad that at school we have got 7 years old Solaris where is just joe, pico and vim
[16:04:40] <OndraSter_> none of them do syntax highlight
[16:04:46] <OndraSter_> I don't care for undo
[16:04:47] <mark4_> joe does
[16:04:50] <OndraSter_> I don't care for *nix
[16:05:15] <mark4_> joe has syntax highlighting. they must have buggered the install
[16:05:34] <JoeLlama> moo
[16:05:37] <OndraSter_> it is just 7 years old
[16:05:45] <JoeLlama> say my name! (:
[16:05:45] <OndraSter_> JoeLlama, Llamas don't do "moo"
[16:05:46] <mark4_> 7 years old is YOUNG
[16:05:50] <OndraSter_> lol
[16:05:51] <JoeLlama> I moo
[16:05:52] <JoeLlama> moo
[16:06:03] <mark4_> do you milk too?
[16:06:20] <mark4_> the llama is of the bovine ilk, one end is moo the other milk ??? :)
[16:06:22] <OndraSter_> only his parents
[16:06:25] <OndraSter_> of money
[16:06:52] <mark4_> anyone got a direct download link for as6 then?
[16:06:56] <JoeLlama> moo
[16:07:03] <mark4_> maybe its better than the POS as5 when i tried it last
[16:07:21] <OndraSter_> you could call it bugfixed and expanded AS5
[16:07:26] <OndraSter_> with ARM support
[16:07:38] <mark4_> wtf do i want ARM support for lol
[16:08:22] <mark4_> i reported about 20 bugs with as4. i bet they never fixed then :/
[16:08:25] <OndraSter_> one IDE to do all ARM, AVR and AVR32
[16:09:05] <mark4_> rikus wake up dammit lol
[16:10:11] <mark4_> does he even still come in here?
[16:10:48] <OndraSter_> he does
[16:10:54] <OndraSter_> RikusW is his full nickname
[16:10:58] <I440r> thats it
[16:17:45] <I440r> lol my windows experience index: processor: 7.8, memory: 7.9, gfx: 7.9, gaming gfx: 7.0, hard drives: 5.9
[16:17:50] <I440r> overall 5.9 :(
[16:20:14] <I440r> http://www.isforth.com/stuff/Milongueo.mp3 <-- /me plays guitar :P
[16:24:44] <I440r> stupid interwebz
[16:27:15] <froggyman> so say I have two .c files: main.c and draw.c . draw.c has several functions that I want to call from main.c.... how do I accomplish this?
[16:27:38] * froggyman will happily take a link or pointer to something that would lead him in the right direction to learn by himself
[16:27:50] <I440r> create a header file and prototype those functions
[16:28:04] <I440r> but mark them extern
[16:28:17] <I440r> extern void foo(void);
[16:28:32] <I440r> then where ever you need to reference foo you include the header file
[16:28:44] <I440r> main.c should not include main.h in this case
[16:28:58] <slidercrank> if you use headers, you don't have to mark a function as extern
[16:29:10] <froggyman> alright, that makes a bit more sense
[16:36:24] <I440r> atmels freeking download site is a pile of trash. i download to about 8% and it stalls and will not resume even with wget -c
[16:36:33] <I440r> it just sits there permantly stalled at 8%
[16:37:12] <I440r> yet if i deleted the file thats 8% complete it starts downloading again
[16:38:47] <Tom_itx> froggyman, #include
[16:39:24] <froggyman> yes?
[16:39:46] <Tom_itx> #include "ultralcd.h"
[16:39:46] <Tom_itx> #include "planner.h"
[16:39:46] <Tom_itx> #include "stepper.h"
[16:39:46] <Tom_itx> #include "temperature.h"
[16:39:46] <Tom_itx> #include "motion_control.h"
[16:39:46] <Tom_itx> #include "cardreader.h"
[16:39:51] <Tom_itx> etc
[16:40:20] <froggyman> I got that part :)
[16:40:34] <Tom_itx> what part don't you got?
[16:40:41] <slidercrank> froggyman, put the prototypes of your drawing functions to draw.h and include draw.h in main.c
[16:41:19] <I440r> fsck. stalled again
[16:41:54] <Tom_itx> // Function Prototypes
[16:41:54] <Tom_itx> void checkButtons(void);
[16:41:54] <Tom_itx> void appTick(void);
[16:41:54] <Tom_itx> void SwitchToCharging(void);
[16:41:54] <Tom_itx> void SwitchToLoad(void);
[16:41:54] <Tom_itx> void Setup(void);
[16:41:54] <Tom_itx> void rpmSetup(void);
[16:42:07] <Tom_itx> then define those functions in your program
[16:42:19] <slidercrank> I440r, what are you trying to download? is it big? I can try and see if I can download it successfully (to see whether it's the problem if the site or not)
[16:42:23] <froggyman> yay! I think it is all working now
[16:42:28] <froggyman> Tom_itx: slidercrank thanks!
[16:42:38] <I440r> http://www.atmel.com/Images/as6installer-6.0.1843.exe <-- that
[16:42:41] <Tom_itx> and stop being so damn froggy
[16:43:14] <I440r> it gets to 6% or 5* and stalls. wget -c wont resume it but if i delete the file it starts over till it gets to about the same percentage and then stalls again
[16:43:39] <slidercrank> I440r, going ok so far
[16:43:41] <Tom_itx> i may have it on my site
[16:44:01] <I440r> yea i get it at a good clip till it gets to the stall point :/
[16:44:45] <slidercrank> I440r, it passed 10% and the speed didn't decline
[16:45:12] <I440r> dammit maybe its me thats sucking
[16:45:21] <Tom_itx> how do you know it's 6%?
[16:45:26] <Tom_itx> use FF to download it
[16:45:32] <I440r> wget tells me the percentage
[16:45:38] <Tom_itx> o
[16:45:43] <slidercrank> 17% [===========> ] 134,638,537 834K/s eta 12m 38s
[16:45:45] <I440r> if you used a real operating system with real download tools hehe
[16:45:55] <I440r> hrm maybe try curl
[16:45:58] <slidercrank> Tom_itx, that's the output of wget
[16:46:18] <Tom_itx> let's all dl it at once and see how good their server is
[16:46:27] <Tom_itx> i'm at 94mb
[16:46:46] <I440r> well im getting interwebz via wifi tether to my android phone lol
[16:46:47] <slidercrank> #avr effect?:)
[16:47:11] <Tom_itx> 2m/sec
[16:47:23] <Tom_itx> (i made that up)
[16:47:43] <slidercrank> 30% already
[16:47:57] <I440r> with curl im at 8%
[16:49:41] <I440r> yup. 9% and stalled
[16:50:10] <slidercrank> I440r, can you accept dcc transfer?
[16:50:16] <I440r> no idea
[16:50:42] <Tom_itx> so did you get it?
[16:50:57] <I440r> seems not
[16:51:01] <slidercrank> 52% now
[16:51:13] <Tom_itx> i'll post it on my site when it finishes here
[16:51:30] <slidercrank> you'll download it faster, I guess
[16:51:53] <Tom_itx> of 370 of 743MB
[17:00:11] <I440r> lol i started it witih curl. it crapped out. so i told wget to resume it.... im at 21% so far...
[17:00:25] <I440r> eep it just stalled for a sec but started back up again
[17:10:24] <slidercrank> I440r, I got it successfully downloaded
[17:12:04] <I440r> i got to 34% but it keeps stalling. ifigured out that if i let it sit stalled for 2 minuts and then ^c it i can resume it for about 20 seconds more
[17:12:14] <I440r> before it stalls again. thers something very seriously wrong here
[17:12:20] <I440r> annoyingly so
[17:23:39] <Tom_itx> wanna grab it from my site?
[17:39:25] <I440r> tom i dont think i need to and i dont think it will help, its obviously my end fucking up
[17:39:45] <I440r> if i let the stalled dl sit there for a few minutes i can resume it later, just cant resume it immediately after it stalls
[17:39:48] <I440r> im at 82% now
[17:39:51] <I440r> ty tho
[17:52:08] <OndraSter> Tom_itx, I am pretty sure I have asked in the past but I have forgot the answer - how do you cope with the RoHS BS when sending your programmer to the europe?
[17:55:04] <Tom_itx> don't ask don't tell
[18:03:46] <Malinuss> After switching from using arduino to avr-c everything became so much cleaner, but it still takes a little longer to figure things out...
[18:05:38] <eadthem> anyone have a block of C code with a tiny bit of inline asm i can use as a example
[18:05:52] <eadthem> docs have been clear as mud on inline asm for c anc c++
[18:06:42] <Tom_itx> http://www.nongnu.org/avr-libc/user-manual/inline_asm.html
[18:06:46] <Tom_itx> did you look at that?
[18:06:59] <eadthem> thers the mud
[18:07:30] <eadthem> nothing there describes how varables enter and leave the asm block
[18:10:43] <Tom_itx> not sure i have any
[18:12:33] <Tom_itx> http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
[18:13:06] <Tom_itx> can you address the var?
[18:13:14] <Tom_itx> use volatile
[18:13:19] <Tom_itx> i'm not sure
[18:15:42] <Tom_itx> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=105855
[18:17:12] <Tom_itx> maybe that last one will help
[18:17:21] <eadthem> think i got it
[18:22:13] <OndraSter_> http://i0.kym-cdn.com/photos/images/list/000/151/628/kitty-says-fuck-the-police-4921.gif?1318992465
[18:23:54] <OndraSter_> that's how I deal with RoHS
[18:24:20] <eadthem> mmm quickly thinking i might be better off doing ASM
[18:27:18] <Tom_itx> why?
[18:27:47] <eadthem> because valid c and c++ code is being declared invalid
[18:27:48] <specing> OndraSter_: We want your boards to be Super Leaded 98
[18:29:04] <eadthem> first question is 0b00000000 supported by gcc
[18:29:18] <eadthem> or do i need to grab my 0b() macro from normal c++
[18:29:21] <specing> eadthem: it is
[18:29:29] <specing> eadthem: inline asm is easy
[18:29:30] <eadthem> int portData = lcdport & 0b11110000;
[18:29:34] <eadthem> int lcdport = ( data & 0b00001111 ) | portData;
[18:29:51] <eadthem> lvalue required as left operatnd of assignment
[18:29:56] <eadthem> on the 2nd line
[18:30:14] <eadthem> data is a int passed in to the function
[18:30:23] <eadthem> i assume that in avr all ints are 8 bits
[18:31:02] <specing> eadthem: compiles fine here
[18:31:12] <specing> avr-gcc --version
[18:31:13] <specing> avr-gcc (GCC) 4.8.0 20121109 (experimental)
[18:31:40] <eadthem> Invoking: AVR8/GNU C++ Compiler : (AVR_8_bit_GNU_Toolchain_3.4.1_830) 4.6.2
[18:31:47] <specing> gcc (Gentoo 4.5.4 p1.0, pie-0.4.7) 4.5.4
[18:31:57] <specing> doesen't complain, either
[18:32:04] <specing> LOL 3.4
[18:32:19] <eadthem> bit odd this is atmel studio 6
[18:32:30] <specing> eadthem: give me the output of gcc --version
[18:32:41] <OndraSter_> specing, sorry, I do only Super Shell 100 :)
[18:32:44] <specing> I don't trust those markings
[18:32:48] <OndraSter_> mayyybe Benzina V-Ultra 100
[18:32:49] <specing> OndraSter_: :D :D :D
[18:33:16] <eadthem> 4.6.2
[18:33:36] <OndraSter_> it is 4.6.2
[18:33:42] <OndraSter_> atmel calls it internally 3.4.1.8
[18:33:47] <specing> then it is broken
[18:35:18] <OndraSter_> http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.1/avr/
[18:35:46] <eadthem> thats what i have as a part of atmel studio
[18:35:51] <OndraSter_> aye
[18:37:08] <eadthem> http://pastebin.com/3a3zmwDs
[18:37:45] <eadthem> void lcdPush(int data) //line 15 int lcdport = ( data & 0b00001111 ) | portData; // line 19
[18:38:38] <eadthem> the lvalue errors are the only 2 i have left others are fixed
[18:39:28] <eadthem> tbh i have no idea what a lvalue is part of my problem might be this is my first time ive used gcc till now its always been msvc++
[18:41:23] <eadthem> o nvm
[18:41:27] <eadthem> figured it out
[18:43:22] <OndraSter> well DUH
[18:43:23] <OndraSter> #define lcdport PORTD
[18:43:29] <OndraSter> int lcdport = ( data & 0b00001111 ) | portData;
[18:43:32] <OndraSter> int PORTD = ..
[18:43:33] <OndraSter> ?!
[18:43:48] <OndraSter> a) PORTD is register
[18:44:02] <OndraSter> and (quite offtopic) int on AVR is in default actually 16bit
[18:44:17] <OndraSter> BUT PORTD IS REGISTER! :D
[18:44:22] <specing> PEBKAC
[18:44:42] <eadthem> int is 16bit?
[18:44:50] <OndraSter> yes
[18:44:53] <OndraSter> but what it is doing there?
[18:44:58] <OndraSter> you do only PORTD = whatever
[18:45:07] <OndraSter> you are not declaring variable called PORTD
[18:45:13] <eadthem> it was a varable
[18:45:18] <eadthem> untill a fue min ago
[18:45:25] <eadthem> the int was forgotten
[18:45:42] <specing> eadthem: use [u]int[witdt]_t types from <stdint.h>
[18:45:47] <specing> width*
[18:46:04] <OndraSter> I have typedef'd uint8_t into byte and uint16_t into word
[18:46:16] <OndraSter> much easier to type.
[18:46:21] <specing> anyone using int is an idiot that is bound to have his code broken in unexpected ways
[18:46:35] <OndraSter> well it is not BECAUSE he was using int..
[18:46:42] <specing> anyway
[18:47:20] <eadthem> the real intent of int was to be the default varable size for a given platform
[18:47:45] <eadthem> i assume because avr8 has a nearly full set for 16bit they went with 16bit
[18:47:48] <OndraSter> yeah well AVR is mostly 8bit with some 16bit stuff
[18:48:01] <OndraSter> 8bit is not much to work with
[18:48:05] <OndraSter> so they made it 16bit
[18:48:27] <eadthem> atm i have 2 error messages
[18:48:39] <eadthem> bad expression and garbage at end of line
[18:48:43] <OndraSter> well get rid of the "int" before the
[18:48:51] <OndraSter> lcdport
[18:48:53] <OndraSter> what is left?
[18:49:00] <eadthem> both related to ccQATLa3.s line 39
[18:49:12] <OndraSter> first things first
[18:49:31] <eadthem> C:\DOCUME~1\eadthem\LOCALS~1\Temp\ccQATla3.s(39,1): bad expression
[18:49:31] <eadthem> C:\DOCUME~1\eadthem\LOCALS~1\Temp\ccQATla3.s(39,1): garbage at end of line
[18:49:50] <OndraSter> well then your ASM code is bad
[18:49:59] <eadthem> i have no asm code
[18:50:00] <eadthem> yet
[18:50:04] <OndraSter> you have
[18:50:08] <OndraSter> asm volatile(
[18:50:09] <OndraSter> "swap &0" "\n\t"
[18:50:09] <OndraSter> : "=r" (data)
[18:50:09] <OndraSter> : "0" (data)
[18:50:09] <OndraSter> );
[18:50:39] <eadthem> yes other than that
[18:50:49] <OndraSter> well that is where the garbage happens
[18:50:55] <specing> OndraSter: I have them typedefed into u8 u16 u32 u64 s8 s16 s32 s64 and byte
[18:51:06] <specing> now that is easy to write :D
[18:51:17] <specing> also modified vim scripts for highlighting
[18:51:20] <OndraSter> not on czech keyboard :D
[18:51:30] <specing> I use US layout
[18:51:30] <OndraSter> where numbers above qwer are actually czech stuff
[18:51:32] <OndraSter> +ěščř
[18:51:34] <specing> best for coding
[18:51:44] <OndraSter> no
[18:51:47] <specing> yes
[18:51:48] <OndraSter> the position of
[18:51:49] <OndraSter> ()
[18:51:51] <OndraSter> is awful
[18:51:52] <OndraSter> on US layout
[18:52:28] <specing> How so?
[18:52:38] <OndraSter> too far
[18:52:43] <OndraSter> on CZ it is next to enter
[18:53:25] <specing> Where are {} []?
[18:53:33] <specing> because those are next to enter on US
[18:53:35] <OndraSter> altgr + b/n/f/g
[18:53:56] <specing> Now that is awful
[18:54:06] <specing> just horrible
[18:56:56] <OndraSter_> <specing> because those are next to enter on US
[18:56:58] <OndraSter_> <OndraSter> altgr + b/n/f/g
[18:57:01] <OndraSter_> -- disconnected
[18:57:03] <OndraSter_> did you write anything after that?
[18:57:36] <eadthem> he said it was awful and horrable
[18:57:38] <eadthem> that was it
[19:02:36] <specing> Router reboot :D
[19:07:52] <specing> took like 30s though
[19:08:09] <specing> Gentoo boot in 10s on 500Mhz x86
[19:08:23] <specing> could probably get it faster though
[19:22:39] <OndraSter_> no I will not
[19:22:40] <OndraSter_> thanks
[21:51:15] <eadthem> so if a hitachi style lcd was say hooked up with polarity reversed
[21:51:21] <eadthem> would it fry
[21:51:30] <eadthem> the lcd did get warm but that was it
[21:51:51] <eadthem> the display shows its single row all black characters on power on
[21:51:57] <eadthem> but dosent seam to want to show anything else
[22:26:17] <Tom_itx> probably not a good sign
[22:26:31] <Tom_itx> you know peter fleury has an lcd lib right?
[22:27:28] <Tom_itx> if you reversed 15 and 16 that's just the backlight
[22:27:39] <Tom_itx> 1 & 2 are power
[22:27:42] <Tom_itx> 3 is contrast
[23:06:16] <al1ta> hi guys
[23:06:40] <al1ta> I'm using an atmel xplain
[23:07:59] <al1ta> I've flashed the the usb microcontroller with XPLAIN Bridge that should program it in a usb to seria
[23:08:24] <al1ta> http://www.fourwalledcubicle.com/XPLAIN.php
[23:08:47] <al1ta> everything seems gone fine
[23:08:58] <al1ta> doing a lsusb I get
[23:09:20] <al1ta> Bus 002 Device 058: ID 03eb:204b Atmel Corp. LUFA USB to Serial Adapter Project
[23:09:39] <al1ta> but when I use avrdude it doesn't work
[23:09:56] <al1ta> avrdude -c avrispmkII -p x128a1 -v -U flash:w:test_leds.hex
[23:10:04] <al1ta> I get the following errors
[23:10:21] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:11:57] <al1ta> avrdude -c avrisp2 -p x128a1 -v -U flash:w:test_leds.hex
[23:11:58] <al1ta> avrdude: Version 5.11.1, compiled on Dec 1 2012 at 18:36:20
[23:12:00] <al1ta> Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
[23:12:01] <al1ta> Copyright (c) 2007-2009 Joerg Wunsch
[23:12:03] <al1ta> System wide configuration file is "/etc/avrdude.conf"
[23:12:04] <al1ta> User configuration file is "/root/.avrduderc"
[23:12:06] <al1ta> User configuration file does not exist or is not a regular file, skipping
[23:12:07] <al1ta> Using Port : /dev/ttyACM0
[23:12:09] <al1ta> Using Programmer : avrisp2
[23:12:10] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:12:12] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:12:13] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:12:15] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:12:16] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:12:18] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:12:19] <al1ta> avrdude: stk500v2_getsync(): timeout communicating with programmer
[23:12:21] <al1ta> AVR Part : ATXMEGA128A1
[23:12:22] <al1ta> Chip Erase delay : 0 us
[23:12:24] <al1ta> PAGEL : P00
[23:12:25] <al1ta> BS2 : P00
[23:12:27] <al1ta> RESET disposition : dedicated
[23:12:28] <al1ta> RETRY pulse : SCK
[23:12:30] <al1ta> serial program mode : yes
[23:12:31] <al1ta> parallel program mode : yes
[23:12:33] <al1ta> Timeout : 0
[23:12:34] <al1ta> StabDelay : 0
[23:12:36] <al1ta> CmdexeDelay : 0
[23:12:37] <al1ta> SyncLoops : 0
[23:12:39] <al1ta> ByteDelay : 0
[23:12:40] <al1ta> PollIndex : 0
[23:12:42] <al1ta> PollValue : 0x00
[23:12:43] <al1ta> Memory Detail
[23:12:49] <al1ta> Block Poll Page Polled
[23:12:51] <al1ta> Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
[23:12:52] <al1ta> ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
[23:12:53] <al1ta> eeprom 0 0 0 0 no 2048 32 0 0 0 0x00 0x00
[23:12:55] <al1ta> application 0 0 0 0 no 131072 256 0 0 0 0x00 0x00
[23:12:57] <al1ta> apptable 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
[23:12:58] <al1ta> boot 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
[23:12:59] <al1ta> flash 0 0 0 0 no 139264 256 0 0 0 0x00 0x00
[23:13:01] <al1ta> prodsig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
[23:13:03] <al1ta> usersig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
[23:13:04] <al1ta> signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
[23:13:05] <al1ta> fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
[23:13:07] <al1ta> fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
[23:13:08] <al1ta> fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
[23:13:10] <al1ta> fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
[23:13:12] <al1ta> fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
[23:13:13] <al1ta> lock 0 0 0 0 no 1 0 0 0 0 0x00 0x00
[23:13:14] <al1ta> Programmer Type : STK500V2
[23:13:16] <al1ta> Description : Atmel AVR ISP mkII
[23:13:17] <al1ta> Programmer Model: Unknown
[23:13:49] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:13:50] <al1ta> avrdude: stk500v2_getsync(): timeout communicating with programmer
[23:13:52] <al1ta> avrdude: stk500v2_ReceiveMessage(): timeout
[23:13:56] <al1ta> any clues?
[23:22:38] <Casper> al1ta: don't do that again
[23:22:46] <Casper> more than 2-3 lines and use a pastebin
[23:26:05] <al1ta> I'm sorry
[23:26:38] <al1ta> I will not do it again
[23:28:26] <Casper> usb to serial is NOT a programmer
[23:30:47] <al1ta> http://pastebin.com/raw.php?i=2gQMMusy
[23:32:16] <al1ta> this is the project
[23:32:19] <al1ta> http://www.fourwalledcubicle.com/XPLAIN.php
[23:40:19] <Tom_itx> umm al1ta, learn about pastebin and use it
[23:40:52] <Casper> Tom_itx: I told him already
[23:41:00] <Tom_itx> so i see now
[23:42:19] <theBear> you got TDI gnd'd ?
[23:43:48] <Tom_itx> could also try the -B32 cmd line option
[23:59:20] <al1ta> also -B32 give me the same result..