#avr | Logs for 2012-07-08

Back
[00:05:58] <dfletcher> I think I can use this slave example code from atmel. but their example uses !busy in the weirdest possible way.
[00:06:56] <Casper> the code example seems sane to me
[00:07:25] <dfletcher> why is it filling the transceiver when there's nothing else to do? it's weird.
[00:07:44] <Casper> it's an example, not a "do it this way"
[00:08:07] <dfletcher> I guess it's just this "simplified example" that's tripping me up. I was trying to use it as a guide. the main() looks a little better.
[04:51:47] <Makdaam> and so the day begins with the blue smoke ritual!
[05:04:23] <CapnKernel> You're supposed to keep the blue smoke in
[05:08:53] <Makdaam> I thought we had to keep on giving semiconductor sacrifices to keep our other projects working?
[05:13:29] <GuShH> only if the ICs are virgin
[05:16:22] <Makdaam> and the ciruit stopped working again :(
[05:16:39] <Makdaam> how hard can it be to make a PNP relay coil driver?
[05:16:58] <Makdaam> when it worked I had the relay disconnected and the transistor blew
[05:18:40] <OndraSter_> as in vcc -- relay - NPN - vss?
[05:18:48] <OndraSter_> did you add diode to the relay?
[05:25:25] <Makdaam> I've got Vcc-Te pin-1k-Tb Tc-relay
[05:25:29] <Makdaam> and relay-gnd
[05:25:42] <Makdaam> + a diode parallel to the relay
[05:26:09] <Makdaam> they right way around (checked)
[05:26:21] <Makdaam> actually this time it can be a burned pin driver
[05:28:27] <Makdaam> um
[05:28:40] * Makdaam facepalms
[05:28:57] <Makdaam> PB1 is the second pin of PortB right after PB0
[05:29:01] <OndraSter_> ye
[05:29:03] <Makdaam> not the first
[05:29:12] <OndraSter_> ..
[05:29:12] <Makdaam> i was driving the wrong pin
[05:29:30] <OndraSter_> also isn't NPN low side switch?
[05:29:38] <OndraSter_> or didn't I just get enough sleep
[05:29:39] <Makdaam> and that kinds is why you always use defines from the include file
[05:29:47] <Makdaam> I've got a PNP
[05:29:51] <OndraSter_> oh
[05:29:55] <OndraSter_> I read it as NPN
[05:29:57] <OndraSter_> anyway
[05:30:02] <Makdaam> yeah
[05:30:03] <OndraSter_> => I didn't get enough sleep
[05:30:04] <Makdaam> it works now
[05:30:07] <OndraSter_> 2.5 hours
[05:30:11] <OndraSter_> ain't enough
[05:30:18] <Makdaam> and that's the same reason I coded the wrong pin yesterday
[05:30:27] <Makdaam> should have waited until morning
[05:30:44] <OndraSter_> I couldn't fall asleep because it was like 10000000C in the room
[05:31:09] <Makdaam> hah
[05:31:17] <Makdaam> we have a storm each night
[05:31:26] <OndraSter_> so I stayed up... fall asleep at 6:30 in the morning, got up at about 9... or was it 10
[05:31:28] <OndraSter_> I wish
[05:31:30] <Makdaam> if it weren't for the storms I wouldn't be able to sleep either
[05:31:33] <OndraSter_> the storm comes in the afternoon usually
[05:32:29] <GuShH> OndraSter_: you got up or floated up, in sweat?
[05:32:45] <OndraSter_> heh
[05:32:51] <OndraSter_> nah it got finally cold in the morning
[05:33:09] <Makdaam> so where are you from?
[05:33:18] <OndraSter_> CZE
[05:33:23] <Makdaam> PL
[05:33:24] <OndraSter_> at least my domain says so
[08:44:34] * Tom_itx turns up OndraSter_'s furnace
[08:44:57] <OndraSter_> you did what?
[08:45:01] <OndraSter_> and why?
[08:45:22] <Tom_itx> didn't want you to get chilly
[08:45:28] <Richard_Cavell> If you can't stand the heat, get out of the IRC channel
[11:03:36] <tlvb> is it possible to call an ISR from regular code?
[11:03:47] <OndraSter_> just put the ISR code into separate function
[11:03:57] <OndraSter_> and call the function from both the code and from the ISR
[11:20:37] <sabesto> i got this 144x168 pixel spi display, you cannot read the data back, is the best way just to keep a local buffer?
[11:21:18] <sabesto> would use up 3/4 of the uC's ram
[11:21:40] <OndraSter_> do you need local copy?
[11:22:06] <tlvb> hm, I have probably found a way around it, thanks though
[11:23:03] <sabesto> OndraSter_: i dont see any good way around it, the least addressable area is 1 line
[11:23:39] <sabesto> so if i medd with something in the top right, i need to know whats in the top left to put it back
[11:23:42] <sabesto> *mess
[11:23:53] <OndraSter_> why?
[11:24:00] <OndraSter_> just overwrite those pixels you need
[11:24:09] <OndraSter_> unless you want to do alpha
[11:24:17] <sabesto> i must overwrite a line at a time
[11:24:26] <OndraSter_> oh
[11:24:29] <sabesto> a full horizontal line
[11:24:53] <sabesto> and there is no and/or/xor functions on it
[11:25:43] <sabesto> might just put an uC there just for the display
[11:25:58] <OndraSter_> :)
[11:26:15] <sabesto> got 3 reels of m128 anyway
[11:26:17] <tlvb> if that is an option, maybe just some external ram would do
[11:26:18] <OndraSter_> heh
[11:26:25] <OndraSter_> m128?
[11:26:29] <sabesto> mega128
[11:26:29] <tlvb> although, an mcu comes with processing power too
[11:26:29] <OndraSter_> use external memory
[11:26:31] <OndraSter_> 128 has xmem
[11:26:37] <OndraSter_> so it uses external SRAM natively
[11:26:42] <sabesto> hm
[11:26:43] <OndraSter_> just requires two full ports
[11:26:47] <OndraSter_> well, two and a half
[11:26:52] <OndraSter_> for full 64kB
[11:28:26] <sabesto> i'll check prices
[11:28:50] <OndraSter_> about 1.5€
[11:28:50] <OndraSter_> :)
[11:28:53] <OndraSter_> for 128kB SRAM
[11:28:54] <OndraSter_> I think
[11:29:10] <sabesto> what was that char after 1.5?
[11:29:19] <OndraSter_> eur
[11:29:22] <sabesto> my charset is messed up again i think
[11:33:07] <sabesto> http://no.farnell.com/amic/a623308m-70sf/sram-cmos-64k-smd-623308-sop28/dp/1112027
[11:33:12] <sabesto> that would work i guess
[11:34:24] <OndraSter_> yeah
[11:34:25] <OndraSter_> but
[11:34:28] <OndraSter_> 128kB ones are cheaper :)
[11:34:44] <OndraSter_> grab 128kB and either ground the highest A16 pin or use bank switching method :P
[11:34:53] <OndraSter_> oh wait
[11:34:58] <OndraSter_> 8K*8 for that much?!
[11:34:59] <OndraSter_> ugh
[11:35:56] <Lt_Lemming> so.., what's the difference between an at90 and atmega?
[11:36:00] <sabesto> its in NOK i guess
[11:36:23] <Lt_Lemming> there are no 128k atmega's with onboard usb, but there is an at90 with it
[11:36:33] <OndraSter_> check datasheet for peripherals
[11:37:15] <sabesto> http://no.farnell.com/bsi-brilliance-semiconductor/bs62lv256sip55/sram-256k-32kx8-2-4-5-5v-sop28/dp/1488948
[11:37:26] <sabesto> that was cheaper
[11:38:02] <sabesto> well, thats for later, now i need to write that library and make the bitmaps
[11:38:25] <OndraSter_> arrghh norweigian farnell sucks! I clicked on "reset" instead "show results"
[11:38:26] <OndraSter_> lol
[11:38:52] <sabesto> you know, there is a "change country" button :P
[11:38:57] <OndraSter_> I know
[11:39:02] <OndraSter_> but then I would have to re-past it again for you :D
[11:40:01] <OndraSter_> well, if you don't need more than 36kB RAM, the 32kB one is enough
[11:40:23] <sabesto> they only got 2 128k ones in some weird package
[11:40:32] <sabesto> the 256k one was cheaper
[11:40:51] <OndraSter_> 128kB, not 128Kb :)
[11:40:54] <OndraSter_> anyway
[11:40:58] <OndraSter_> the 32kB one is "the cheapest"
[11:41:10] <OndraSter_> I have got here actually 128k*8 in DIP even :o
[11:41:16] <OndraSter_> lying on my table :D
[11:41:32] <sabesto> yeah, but it could be handy to have some chips in stock
[11:41:43] <OndraSter_> ?
[11:41:43] <sabesto> i would order 50 or something
[11:41:47] <OndraSter_> ugh :)
[11:41:48] <Tom_itx> OndraSter_ what do you need sram for?
[11:41:54] <OndraSter_> Tom_itx, me? not anymore
[11:41:58] <sabesto> display memory
[11:41:59] <OndraSter_> I used it on my LED project
[11:42:02] <OndraSter_> for display memory as well
[11:42:03] <Tom_itx> oh
[11:42:12] <Tom_itx> i have some sram chips here that are old
[11:42:24] <OndraSter_> I have got here eight 64kB (8bit bus) as well
[11:42:25] <Tom_itx> from my 68hc11 and 68332 stuff
[11:42:30] <OndraSter_> from old 486 motherboard
[11:42:41] <OndraSter_> plus the 128kB one
[11:42:44] <OndraSter_> all in DIP
[11:42:51] <Tom_itx> wait, is that the same as battery backed ram?
[11:43:04] <OndraSter_> no
[11:43:12] <OndraSter_> wait what?
[11:43:32] <Tom_itx> these needed a 3v battery or they'd go stupid when you turned them off
[11:43:33] <OndraSter_> sabesto, where did you get so much megas btw?
[11:43:50] <OndraSter_> Tom_itx, sure the content goes to the trash when you power them off
[11:43:51] <sabesto> donated from atmel
[11:43:55] <OndraSter_> sabesto, HOW
[11:43:56] <OndraSter_> HOOWWWW
[11:44:16] <OndraSter_> did you rob them?
[11:44:18] <sabesto> my uni is 10 min away from the office
[11:44:22] <OndraSter_> oh
[11:44:37] <OndraSter_> :(
[11:44:37] <sabesto> the "A" in AVR went to my school too
[11:44:49] <OndraSter_> 3 reels of m128..
[11:44:51] <OndraSter_> yummy
[11:44:56] <OndraSter_> but
[11:45:11] <OndraSter_> xmegas are the future!
[11:45:18] <OndraSter_> I wish atmel and others would push them
[11:45:31] <sabesto> they do, at least on us
[11:45:50] <sabesto> getting some trays of xmega
[11:45:53] <OndraSter_> yay
[11:46:03] <sabesto> but ive been messing with ASF and i dont like it :P
[11:46:17] <OndraSter_> :D
[11:46:23] <OndraSter_> screw asf
[11:47:07] <OndraSter_> once I get all the money I need I will start making this
[11:47:07] <OndraSter_> http://clip2net.com/s/26irE
[11:47:22] <OndraSter_> http://clip2net.com/s/26irU
[11:47:25] <sabesto> OndraSter_: https://dl.dropbox.com/u/47833678/IMAG0146.jpg
[11:47:41] <OndraSter_> :)
[11:48:02] <sabesto> cool, is that altium?
[11:48:40] <OndraSter_> nah
[11:48:44] <OndraSter_> that is webGerber rendering
[11:48:45] <OndraSter_> I use Eagle
[11:48:58] <OndraSter_> http://mayhewlabs.com/webGerber/
[11:49:04] <sabesto> hmm
[11:49:33] <sabesto> i use kicad now, but thats because i'm hired by the school to develop a product
[11:49:43] <sabesto> need to use something legal :P
[11:49:49] <OndraSter_> :D
[11:49:53] <OndraSter_> free Eagle?
[11:50:02] <OndraSter_> limited to something like 100x100 boards
[11:50:04] <OndraSter_> or whatever
[11:50:09] <sabesto> yes, too small
[11:50:13] <OndraSter_> o
[11:50:14] <OndraSter_> oh
[11:50:46] <sabesto> maybe not for the components, but it will be mounted inside an alu enclosure with these rails for pcb's
[11:51:00] <sabesto> and guess what, they are 105mm wide
[11:51:34] <sabesto> but kicad is better then eagle, at least i think so
[11:51:46] <OndraSter_> nah
[11:51:55] <OndraSter_> I found Eagle the easiest one to use
[11:51:57] <sabesto> even though the library system is fucked
[11:52:03] <OndraSter_> that's why
[11:53:16] <sabesto> ive used eagle for some years and i'm not going back
[11:57:28] <sabesto> this doesnt look good :P "uint8_t buffer[3024]"
[11:57:51] <OndraSter_> heh
[11:58:16] <OndraSter_> I think that it will kick you
[11:58:23] <OndraSter_> there are limits for the size
[11:58:26] <OndraSter_> of the array
[11:58:30] <OndraSter_> 256 or 512 I think
[11:59:19] <sabesto> worked fine in progmem
[11:59:41] <sabesto> no errors, idk
[11:59:51] <jacekowski> progmem is bigger
[11:59:53] <sabesto> thats a minor problem if so anyway
[12:00:00] <jacekowski> that's 3k worth of ram you allocated there
[12:00:08] <jacekowski> on probably 1k or 2k device
[12:00:08] <sabesto> i know
[12:00:12] <sabesto> no
[12:00:14] <sabesto> 4k
[12:00:33] <sabesto> thats why i neew external sram as we have been discussing
[12:00:56] <sabesto> maybe not if i will smack a dedicated uC on the display
[12:02:05] <OndraSter_> :)
[12:02:14] <OndraSter_> I need some driver for 480x800 display
[12:02:24] <OndraSter_> @ 24bit colors (16bit would be enough probably too)
[12:02:47] <OndraSter_> aka some chip with either XMEM or software XMEM
[12:03:04] <OndraSter_> BUT all SRAMs with 1MB size are fairly expensive
[12:03:17] <OndraSter_> (750kB for 16bit colours)
[12:03:32] <OndraSter_> I could use DRAMs with burst read
[12:04:24] <sabesto> and you really need DMA
[12:04:58] <OndraSter_> well
[12:05:05] <OndraSter_> I'd probably go for some ARM most likely
[12:05:15] <OndraSter_> for this resolution the dot clock is about 24MHz I think
[12:05:20] <OndraSter_> FYI http://www.ebay.com/itm/BIGGEST-COLLECTION-EVER-22-SEGA-NINTENDO-PC-ENGINE-FULLSETS-FACTORY-SEALED-/300736846867
[12:05:22] <OndraSter_> :o
[12:07:27] <sabesto> for fucks sake
[12:07:49] <jacekowski> you need dedicated display driver
[12:07:56] <OndraSter_> jacekowski, the thing is
[12:08:02] <OndraSter_> if I want to get high update rate
[12:08:10] <sabesto> need to keep in mind that you need to buy a new house to store all those games
[12:08:16] <sabesto> fpga
[12:08:18] <OndraSter_> I could as well plug it directly into some RAM<>display interface
[12:08:23] <OndraSter_> my original thoguht was CPLD :)
[12:08:50] <OndraSter_> ignore my pre-previous line, it makes no sense*
[12:09:29] <Tom_itx> OndraSter_ did you bid on that?
[12:09:36] <OndraSter_> no
[12:09:41] <OndraSter_> I don't have any room left in my house
[12:10:18] <sabesto> "bid on that?" its 1,000,000 usd...
[12:10:34] <sabesto> oh, euro even
[12:10:38] <sabesto> even more
[12:10:59] <sabesto> probably just to get PR though
[12:11:35] <Landon> http://imageshack.us/photo/my-images/32/drpaolonototteokivideof.jpg/
[12:11:37] <Landon> you just have to wonder
[12:12:52] <sabesto> what the next image was (thats 403 by imageshack)
[12:13:39] <sabesto> my god there must be a lot of crappy games in that collection
[12:14:00] <OndraSter_> ALL OF 'EM
[12:14:03] <OndraSter_> ALL EVER MADE!
[12:14:04] <OndraSter_> lol
[12:14:16] <Landon> I do not understand collectors *facepalm*
[16:26:00] <OndraSter_> arrgh
[16:26:07] <OndraSter_> BRAINFUCK, Y U NO SECOND MEMPTR!
[16:26:37] <specing> that would be CLUSTERFUCK
[16:26:50] <OndraSter_> I feel like it is not so easy to make stuff like "set whole memory to 0"
[16:26:53] <OndraSter_> using loops
[16:27:24] <OndraSter_> because the loop number is in the one cell always
[16:27:49] <OndraSter_> and once you do > the memptr is gone
[16:27:53] <OndraSter_> on another cell
[16:32:26] <tlvb> What is the difference between usart data register empty and transmit complete interrupts? wouldn't they trigger at the same point?
[16:33:01] <OndraSter_> no
[16:33:13] <OndraSter_> register empty happens before transmit complete
[16:33:27] <OndraSter_> there is still STOP bit to be transfered but the data register is empty already
[16:33:49] <tlvb> ah
[16:33:50] <OndraSter_> (that's what common sense says to me, now let's check datasheet)
[16:37:06] <specing> tlvb: you want to trap register empty
[16:37:13] <specing> tlvb: it is the best solution
[16:38:08] <Makdaam> unless you want to repurpose the TX pin on the fly... then use TXC
[16:38:53] <tlvb> OndraSter_: it seems that you are right; even if it does not seem to say so outright in the datasheet, it seems to be implied
[16:39:32] <tlvb> specing: and I have always used TXC ...for symmetry with RXC or something heh, one learns something new every day
[16:40:03] <tlvb> OndraSter_: also, the parity bit, if one has that enabled
[16:40:07] <OndraSter_> yes
[16:40:19] <specing> tlvb: data register empty triggers when the FIFO is not full, TXC triggers when transmission has stopped
[16:40:30] <specing> you want to use data register empty
[16:41:05] <OndraSter_> how long is the FIFO anyway? one byte being sent and one byte being in the DATA reg...?
[16:41:13] <OndraSter_> how deep*
[16:41:16] <specing> tlvb: you only do TXC when you fiddle with error correction
[16:41:27] <specing> OndraSter_: 2 bytes for tx and 3 for rx
[16:41:34] <OndraSter_> sounds about right
[16:47:04] <grummund> TXC is useful for half-duplex systems
[16:47:43] <grummund> so you know when to disable the transmitter
[17:52:22] <tlvb> I seem to have managed to get a interrupt driven, ring buffered usart transmission routine setup working YAY! ...now to get reception to work also...
[18:48:21] <Casper> tlvb: if you want a premade library, check up peter fleury's uart lib
[18:48:42] <Casper> interrupt driven ring buffer
[19:37:55] <mulvane> Hrm
[22:03:06] <rue_mohr> the fifo is 4x the chips ram capacity, a special compression method is used to compress the data
[22:03:17] <rue_mohr> every 3rd byte is thrown out
[22:03:52] <rue_mohr> hey, anyone familiar with serial timing waveforms for rs232 handshaking?
[22:04:12] <rue_mohr> I cant find DTR RTS etc timing waveforms anywhere
[22:24:50] <Tom_itx> rue_mohr, try: http://www.spectron.us/NewWebRoot/ProductivityTools/TimeIt/TimingDtrRts.php
[22:25:14] <Tom_itx> maybe not
[22:34:19] <rue_mohr> no they dont say how long before the data stops
[22:34:33] <rue_mohr> they dont compare it to the data at all
[22:45:45] <Tom_itx> how much did those signals get used anyway?
[22:46:13] <Tom_itx> that was hardware handshaking wasn't it?
[22:46:30] <Tom_itx> most used ack nak didn't they?
[22:46:37] <rue_mohr> yesm, bvut they dont relating it at all to the actual start/stop of the data bits
[22:47:12] <Tom_itx> no, it simply says 'i'm ready'
[22:47:25] <Tom_itx> or 'are you ready'