#avr | Logs for 2015-01-21

Back
[02:48:00] <umquant> I have a general RTOS question. When using a mailbox design are global variables typically used? Or is it better to have specific producer/consumer pairs for functionality
[03:17:07] <malinus> umquant: are you using a 32bit AVR?
[03:18:12] <umquant> I am actually using a stm32. I figured if I stayed general it would be sorta on topic
[03:36:36] <inflex> Eish... trying to use us in AVR simply because we're a more refined, intellectually filtered group ;)
[03:49:47] <malinus> I was just wondering, because most topics in here are about 8-bit avr's.
[12:04:12] <megal0maniac> Hi all :)
[12:04:22] <nestharus> hihi
[12:05:15] <megal0maniac> I have a 12V source and an LED. Is there a way to ensure 1A constant current without using a resistor?
[12:06:28] <nestharus> would anyone be able to help out with building a decoder circuit for hooking the Arduino Mega 2560 up to an 82C55A? Was told to come here from Arduino chat ;o
[12:07:37] <LeoNerd> What is an 82C55A?
[12:07:47] <nestharus> http://pdf1.alldatasheet.com/datasheet-pdf/view/66113/INTEL/82C55.html
[12:08:26] <LeoNerd> Oh it wants a parallel bus
[12:08:38] <nestharus> aye, gotta hook up a printer to it with that :o
[12:08:47] <LeoNerd> That should be simple enough surely..? Though... you'd use almost as many IO lines from the mega as it would give you anyway
[12:08:51] <LeoNerd> I don't really see a point
[12:09:08] <nestharus> Well, I'm super super super super rusty on hardware since I'm a software person
[12:09:15] <nestharus> so... I remember almost nothing of how to do this >.<
[12:09:24] <nestharus> and I've gotta have it done by like Tuesday D:
[12:09:34] <nestharus> so I'm semi-freaking out heh
[12:09:48] <LeoNerd> That gives you 24 IO pins.. do you -need- all 24 IO pins?
[12:10:04] <LeoNerd> you'll need 14 IO pins just to talk to it
[12:10:45] <nestharus> well, I've gotta do partial decoding with foldback to bits A8 to A15
[12:11:19] <LeoNerd> ?
[12:11:50] <nestharus> at address CD00H
[12:12:02] <nestharus> it has to be mapped as external data memory
[12:12:11] <nestharus> it should be pretty evident that I'm pretty lost right now :O
[12:12:22] <LeoNerd> I'm also pretty lost as I have no idea what you're trying to do
[12:12:38] <nestharus> lemme cnp
[12:12:38] <LeoNerd> This chip is not the sort of chip I'd expect to see next to an ATmega
[12:12:53] <LeoNerd> This is an IO expansion chip you'd typically use with a bus-based CPU
[12:12:57] <nestharus> yea
[12:12:59] <nestharus> Design and build an Atmega2560 address decoder circuit for the 82C55 mapped as external DATA memory with a base (beginning) address of CD00H using partial address (allow the 82C55 to foldback for 256 byte -> decode only address bits A15 through A8) decoding. Show the work for each step of your design including the memory map, memory address table, Boolean equation, and logic circuit diagram.
[12:13:11] <nestharus> >.<
[12:13:16] <nestharus> if I can get helpo with this as review
[12:13:20] <LeoNerd> So I'm struggling to understand what you'd be hoping to gain from connecting them together
[12:13:20] <nestharus> I'll be ok for the rest of everything :|
[12:13:29] <nestharus> I have no idea, I just have to do ti lol
[12:13:50] <LeoNerd> Ahh... as external MMIO
[12:13:59] <LeoNerd> Yes; I forgot that such chips as the mega2560 can do that
[12:14:05] <LeoNerd> That's -starting- to make a little tiny bit of sense now
[12:15:12] <nestharus> and avrdude works with the mega 2560 right? Only saw a few threads on it saying that it wasn't exactly legit for that purpose
[12:15:26] <nestharus> was more for the uno
[12:17:14] <hypermagic> megal0maniac, yes there is, use 50 pieces of 20mA J-FETs in parallel that has 20mA current
[12:17:33] <megal0maniac> That sounds like a terrible idea
[12:17:49] <hypermagic> no it is perfect current generator
[12:18:00] <hypermagic> into the hundreds of megahertz region
[12:18:25] <hypermagic> and you wanted a method without resistor - that is dumb ;)
[12:23:48] <hypermagic> i think i have another method for this dumb quest
[12:24:18] <hypermagic> construct a cmos oscillator using jfet and capacitor, and use capacitor to charge-pump at fix frequency fo led
[12:24:41] <hypermagic> so jfet will charge discharge the timing capacitor at constant rate
[12:24:53] <hypermagic> this way it does not need resistor
[12:25:05] <hypermagic> but this will not be regulated for A.
[12:26:57] <hypermagic> if hall elements does not count as resistor then a current regulation can be achieved by measuring the strength of the magnetic field of the conductor leading current to the led
[12:27:38] <hypermagic> but for low currents we usually use a shunt resistor in series and measure the voltage drop across it to see what current is flowing
[12:28:08] <hypermagic> it is basically a piece of wire
[12:28:13] <hypermagic> that has resistance
[12:28:24] <hypermagic> so, you have all superconductor wiring?
[12:30:14] <nestharus> O_o
[12:31:05] <nestharus> hypermagic, you an electrical engineer? :o
[14:23:23] <garulf> hi guys, somebody of you recompile last avrdude to enable linuxgpio? I did it but linuxgpio doesn't show up in the programmers list
[15:39:48] <DO9XE> hey, is someone arround who knows something about the dfu programmer? I just solderd my prototype together, plugged USB in an now i can find the following line in "lsusb" (on linux)
[15:39:49] <DO9XE> Bus 002 Device 008: ID 03eb:2ffb Atmel Corp. at90usb AVR DFU bootloader
[15:40:35] <DO9XE> I got the DFU-Programmer, but how do i read from the device? i allready tryed some options, but allways: no device present
[15:49:15] <Tom_itx> i thought DFU programmer was software
[15:49:52] <DO9XE> yes, but it interacts with the bootloader ;)
[15:50:07] <Tom_itx> so did you ground the HWB pin and press reset?
[15:50:13] <Tom_itx> that puts it into programming mode
[15:51:29] <DO9XE> ahhh, what if i boot it with the butten pressed? (i copied it from the USBKEY board)
[15:52:53] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_User_manual_index.php
[15:52:59] <Tom_itx> follow that. it's very similar
[15:53:18] <Tom_itx> To put the USBTinyMkii into DFU programming mode, push and hold the 'HWB' button. While the 'HWB' button is depressed press the 'RESET' button then release both.
[15:53:23] <DO9XE> okay :) thanks :)
[15:54:08] <DO9XE> damn :D got no reset button :D
[15:54:38] <Tom_itx> you got a reset pin
[15:55:21] <Tom_itx> silly noobs
[15:55:27] <DO9XE> i know ;) hard to hin in smd :D
[15:56:22] <DO9XE> well, I aint a noob :D just forgott to add a button ;) Im in electronics for a few years now, but never worked with this bootloarder :P
[15:57:34] <Tom_itx> just messin...
[15:58:36] <Tom_itx> keep in mind, if you program that with ISP you will overwrite the bootloader
[15:59:04] <DO9XE> jipp, I'll try hard to not do that :D
[16:02:12] <DO9XE> hmm, that didn't change a thing :/ still this device: "ID 03eb:2ffb Atmel Corp. at90usb AVR DFU bootloader"
[16:03:26] <DO9XE> and the dfu-programmer tells me no device present :P
[16:05:48] <Tom_itx> check the rest of your wiring?
[16:06:17] <Tom_itx> especially the part going from the usb plug to the U chip
[16:06:33] <DO9XE> in linux you can see all your devices with "lsusb"
[16:06:45] <Tom_itx> since you didn't tell me which U chip you had
[16:06:55] <DO9XE> at90usb1287
[16:07:19] <Tom_itx> you may be able to see it but in program mode it may not be communicating
[16:07:31] <Tom_itx> check the rest of your wiring
[16:08:00] <Tom_itx> i've made hundreds of those and have come across it once or twice
[16:08:00] <DO9XE> i got a USB device called "Atmel Corp. at90usb AVR DFU bootloader"
[16:08:19] <Tom_itx> ok?
[16:08:36] <Tom_itx> is that from DFU?
[16:08:53] <Tom_itx> i generally don't use DFU i use FLIP with windows
[16:09:07] <Tom_itx> not sure what all the responces are from it
[16:09:31] <DO9XE> no, its the list of connected USB devices. and (luckily/sadly) i dont have windows
[16:39:42] <Shavik|Work2> So my first time really using a ATMega324, used to the 328. Having some some timing/interrupt issues. the 324's are running at 20Mhz while the 328's are 16Mhz. I've changed the F_CPU value.
[16:39:59] <Shavik|Work2> It feels like the 324 chip is running quite a bit slower. I've checked the CKDIV8 flag
[16:42:45] <Shavik|Work2> Was a common theme that interrupts weren't working as my serial wasn't receiving and my ADC interrupt wasn't firing. I've verified ISR names and determined serial did work when I checked in main. Just my RX Complete ISR is never firing.
[16:55:31] <Shavik|Work2> Also just checked CKOUT and it's 20Mhz. so now im not sure :/
[16:56:25] <Tom_itx> SEI() ?
[16:59:05] <Shavik|Work2> Yea. I called that
[16:59:23] <Shavik|Work2> quite perplexing
[17:00:39] <Shavik|Work2> I was at one point trying to read the ADC channels via interrupt but the values never changed from zero so I moved it to waiting in the main loop for the read to complete. Now I'm having issues with my known good (from the 328p) uart code (with modified ISR vectors) on this chip.. once again, with interrupts
[17:00:58] <Shavik|Work2> I searched my code. I'm not even calling CLI anywhere so its not like they are getting turned off and not back on
[17:13:13] <Shavik|Work2> Is there anything that could mess with the interrupt table?
[17:38:37] <Shavik|Work2> I feel like _delay_ms is wayyyy off
[17:40:52] <malinus> Shavik|Work2: could be a ton of stuff wrong with your code.
[17:41:02] <malinus> just fix one problem at a time
[17:41:15] <Shavik|Work2> Well I feel its all related to one another
[17:42:01] <malinus> if you are usin delay, it sure can be
[17:59:07] <Jartza> also the fuses or F_CPU might be wrong
[18:32:33] <malinus> they obviously must be, if the delay is way off
[18:37:34] <Jartza> not "must", might :)
[18:39:23] <Jartza> if the code has a lot of interrupts, the delays might also be way off quite a lot
[18:54:12] <theBear> Shavik|Work2, if your defs are wrong about clock speed (and/or perhaps some counter setting/divider value) that will throw it WAY off
[18:59:01] <hypermagic> nestharus, i am many things
[18:59:53] <nestharus> so, are you also a software engineer? : o
[19:17:23] <hypermagic> that too
[19:17:31] <hypermagic> and you?
[19:42:33] <MarkX> quick question
[19:43:40] <MarkX> i'm designing a PCB, a couple of the components use standard packaging like SOT-23. is it better practice to make one footprint and use for all the components? or do most people make a new footprint per component even if it shares a standard package?
[19:45:48] <Tom_itx> if the footprint is the same use it
[19:46:10] <Tom_itx> just change the pinout for the different parts
[19:47:55] <hypermagic> standard package requires standard footprint.
[19:48:17] <hypermagic> my sot23 design works after 13 years...
[19:52:36] <MarkX> hypermagic: perfect, thanks