#avr | Logs for 2014-12-11

Back
[04:28:03] <staropram> When programming an AVR chip with an ICSP header, how can I avoid conflicts if I am using the same pins for digital outputs?
[04:28:36] <ecilop> ISP?
[04:28:46] <staropram> Does the ISP programmer hold reset low when it operates?
[04:29:01] <staropram> ISP (In Circuit Serial Programmer), aka (ICSP)
[04:29:42] <twnqx> yes
[04:29:46] <staropram> I'm trying to understand under what conditions something connected to the MISO, MOSI, and SCK pins would cause interference to the programmer
[04:29:54] <twnqx> afaik it does
[04:30:14] <staropram> My hypothesis so far is that this would only happen if you had another SPI device connected to the bus, and the device was not being held high on it's SS pin
[04:30:22] <ecilop> To program and verify the ATmega16 in the SPI Serial Programming mode, the following
[04:30:24] <ecilop> sequence is recommended (See four byte instruction formats in Figure 116 on page 276):
[04:30:27] <ecilop> 1. Power-up sequence:
[04:30:30] <ecilop> Apply power between VCC and GND while RESET and SCK are set to “0”. In some sys-
[04:30:33] <ecilop> tems, the programmer can not guarantee that SCK is held low during power-up. In this
[04:30:36] <ecilop> case, RESET must be given a positive pulse of at least two CPU clock cycles duration
[04:30:39] <ecilop> after SCK has been set to “0”.
[04:30:42] <ecilop> 2. Wait for at least 20 ms and enable SPI Serial Programming by sending the Programming
[04:30:45] <ecilop> Enable serial instruction to pin MOSI.
[04:30:48] <ecilop> 3. The SPI Serial Programming instructions will not work if the communication is out of syn-
[04:30:51] <ecilop> chronization. When in sync. the second byte ($53), will echo back when issuing the third
[04:30:54] <ecilop> byte of the Programming Enable instruction. Whether the echo is correct or not, all four
[04:30:57] <ecilop> bytes of the instruction must be transmitted. If the $53 did not echo back, give RESET a
[04:31:00] <ecilop> positive pulse and issue a new Programming Enable command.
[04:31:44] <twnqx> the simpler way it to put a pullup on the client device's SS pin
[04:32:02] <staropram> OK, cool
[04:32:05] <staropram> Thanks
[04:32:17] <staropram> So you'll only get interference if a client on those pins is not being silent
[04:32:26] <twnqx> (you will need that anyway since during reset, all IO pins of the avr will be inputs)
[04:32:56] <staropram> I didn't know whether just using those pins would cause problems, but the first thing it does is pull reset low so thats cool
[04:33:43] <twnqx> basically, your program will not run, but the SS pin will have an "undefined" input signal
[04:33:47] <staropram> I'm just working on a small "neopixel" controller for christmas. I'm regretting it as as usual I added too much onto the board and it's hand soldered
[04:34:04] <twnqx> heh
[04:34:05] <staropram> as in perfboard soldered
[04:34:07] <staropram> :)
[04:34:12] <twnqx> i will need a neopixel controller soon, too :P
[04:34:18] <twnqx> but it won't have much
[04:34:51] <twnqx> avr mega8u2, esp8266 module connector, µSD card, onboard SPI NOR flash
[04:35:01] <twnqx> levelshifter for 3.3V -> 5V to drive the LEDs
[04:35:06] <twnqx> (8 pieces)
[04:35:08] <twnqx> that's it
[04:35:15] <staropram> They work quite well at 3.3
[04:35:38] <twnqx> i'm going to drive PL... something LEDs
[04:35:39] <twnqx> 5mm
[04:35:54] <twnqx> pl9823
[04:36:09] <twnqx> they are worse than the es2812 :P
[04:36:10] <twnqx> ws*
[04:36:30] <staropram> OK
[04:36:52] <twnqx> also, just one 20pin IC i think
[04:37:18] <staropram> Yeah
[04:37:23] <staropram> I've got a few IC's on mine: http://postimg.org/image/55b5dj3gt/
[04:37:56] <staropram> I wanted to have a 7 seg output, because that always makes things cool
[04:38:34] <staropram> The pots are for controlling the neopixel strip colors, and then the 4th pot is for moving color blocks along the strip
[04:38:43] <twnqx> heh
[04:38:50] <twnqx> yeah, no user controls for me :P
[04:38:57] <staropram> I'm going to write a program so you can set up arbitrary color blocks on the strip. As it will go in the kitchen and my wife will need to be able to control it ;)
[04:39:08] <twnqx> fully preprogrammed for me
[04:39:19] <staropram> How many leds are you going to have?
[04:39:21] <twnqx> individually controllable LEDs ask for programs :P
[04:39:28] <twnqx> i have two projects atm
[04:39:37] <twnqx> a) an infinity mirror with 60 LEDs
[04:39:43] <twnqx> b) an LED cube with 512
[04:40:14] <twnqx> which is why i want 8 outputs
[04:40:14] <staropram> 512, that's going to be fun wiring up
[04:40:18] <twnqx> nah
[04:40:24] <twnqx> it's super simple
[04:40:44] <staropram> I was thinking, if you could 3D print a conductive plastic material
[04:41:03] <staropram> You could print a cube in clear acrylic with the wiring all inside
[04:41:23] <staropram> Or if you made it hollow and injected some kind of setting conductive paste
[04:41:30] <staropram> you could then just poke all the leds through and be done
[04:41:49] <staropram> I made a 3x3x3 cube before, and it took me a while
[04:43:48] <twnqx> using individually addressable LEDs really simplifies things
[04:43:53] <twnqx> it's just a bit ugly atm :(
[04:44:50] <staropram> Right, I didn't think about that. Yes, with individually addressable leds you don't need the matrix
[04:45:52] <staropram> I would imagine it is still difficult to get the wires thin enough that they are not intrusive
[04:46:41] <twnqx> http://i.imgur.com/peclWPE.jpg
[04:46:54] <twnqx> like i said, ugly
[04:47:10] <twnqx> probably gonna rip it apart and replace the LED pins with something... better
[04:47:21] <twnqx> just 8 of these planes, done :P
[04:47:53] <staropram> It looks pretty clean to me
[04:48:15] <staropram> You must be a perfectionist :)
[04:48:26] <twnqx> i can't get the 2mm copper on the sides straightened
[04:48:37] <twnqx> the 1mm was easy to pull
[04:48:42] <twnqx> i'm not strong enough for 2mm :(
[04:49:12] <twnqx> well... i am contemplatign to have the full grid laser cut
[04:49:30] <staropram> Do you have a makerspace nearby that could do it?
[04:49:33] <twnqx> nope
[04:49:50] <twnqx> problem is that copper and copper alloys are not easy to laser cut
[04:50:24] <twnqx> i foudn a place that can cut aluminium, but that's not really solderable to tin
[04:50:37] <twnqx> well, not easily at least
[04:51:43] <staropram> Is it possible to copper plate aluminium?
[04:51:43] <twnqx> and non-intrusive might be troublesome due to power requirements :D
[04:52:11] <twnqx> you will have problems with electrocorrosion (+- whatever that is in english)
[04:52:26] <staropram> If you can get steel cut there is this: https://www.youtube.com/watch?v=AiML2lvwWY8
[04:52:33] <twnqx> stell's not a problem
[04:52:35] <staropram> He's a guy that lives near me, total genius
[04:52:37] <twnqx> steel*
[04:57:52] <twnqx> heh, but he doesn't tell what that liquid is :P
[04:58:34] <twnqx> i wanted to use http://en.wikipedia.org/wiki/Nickel_silver actually
[05:03:00] <twnqx> ugh
[05:03:15] <twnqx> good i didn't delve deeper into that... horrible electrical resistance
[05:04:09] <twnqx> 10 times worse than aluminium :S
[05:04:27] <twnqx> almost 20 times that of copper
[05:41:45] <hetii> Any clue what is called by eclipse to generate linker script ?
[05:59:24] <twnqx> normally linker scripts aren't created... they come with the chip
[05:59:33] <twnqx> as part of binutils
[05:59:52] <twnqx> unless we are talking about different things :S
[06:03:42] <twnqx> staropram: Oo
[06:04:02] <twnqx> i just got an offer for having carrier panels for the LEDs laser cut
[06:04:11] <twnqx> it's not even THAT expensive
[06:04:36] <twnqx> 13.5€ (probably + VAT) including material
[06:04:45] <twnqx> per plane of 25x25cm
[06:39:24] <staropram> That's as many cuts as you want in a 25x25cm plane?
[06:40:23] <staropram> I just spent half an hour looking for a fault on the perfboard. Turns out there was a trace sliced in half with a very thin cut. Must have happened when it was in the box bashing around
[06:41:50] <staropram> twnqx: what exactly would you cut out of a carrier panel?
[06:46:01] <twnqx> the wiring for the LEDs :P
[06:52:53] <staropram> I see
[06:52:56] <staropram> :)
[06:53:12] <staropram> Is anyone else here using FreeBSD?
[06:53:26] <staropram> I get a strange delay with avrdude before it uploads. It seems to wait maybe 10-15 seconds
[06:53:42] <Lambda_Aurigae> not in about 10 years. All linux here.
[06:56:51] <twnqx> tried bsd once, dismissed it quickly...
[06:56:53] <staropram> ok
[06:57:25] <Lambda_Aurigae> I used FreeBSD almost exclusively for nearly a year back in the 90s.
[06:57:59] * twnqx currently has windows booted due to total lack of usable CAD software for linux :(
[06:58:00] <staropram> Why did you stop?
[06:58:15] <staropram> twnqx: what kind of CAD software?
[06:58:23] <Lambda_Aurigae> slackware linux was, at the time, moving forward faster.
[06:58:25] <twnqx> in the grands of solidworks
[06:58:44] <Lambda_Aurigae> and I kinda just stuck with linux.
[06:58:51] <twnqx> (currently testing geomagic design. promising ideas, but... bad user experience)
[07:00:49] <staropram> Did you try freecad?
[07:01:01] <staropram> Lambda_Aurigae: fair enough
[07:01:50] <Lambda_Aurigae> went through slack to redhat to mandrake to debian to ubuntu and now I use debian and ubuntu for different purposes, whichever fits best.
[07:02:28] <Lambda_Aurigae> even screwed with gentoo for a while, back when it took a week to do a full install because the only thing that came pre-compiled was the installer and compiler.
[07:02:35] <twnqx> sigh
[07:02:37] <twnqx> python again
[07:02:53] <staropram> I use FreeBSD for the desktop and debian on the laptop
[07:02:53] <twnqx> can't people finally rid the world of that abonimation of a "programming language"
[07:02:58] <staropram> lol
[07:04:05] <twnqx> still, i'll give freecad a try
[07:06:01] <staropram> I recently taught myself kicad and got a board made
[07:06:18] <staropram> It's actually really nice, now that they have the PNS routing and the opengl graphics layer from CERN
[07:24:15] <LeoNerd> kicad is nice
[07:24:36] <LeoNerd> I recently submitted a patch to the eagle->kicad import plugin
[07:24:43] <LeoNerd> It now handles curves
[07:37:55] <staropram> Curves!
[07:38:02] <staropram> What, curved traces?
[07:41:11] <LeoNerd> Curved line segments
[07:41:18] <LeoNerd> copper, silkscreen, board outline, etc...
[07:42:34] <staropram> Awesome
[07:43:00] <LeoNerd> I mostly needed it for board outline, but it works on any layer
[07:44:49] <staropram> That's good. I want to have curved traces :)
[07:45:14] <LeoNerd> Microwave?
[07:45:21] <staropram> No, just aesthetics
[07:45:35] <LeoNerd> Ah
[07:45:39] <staropram> But also I think in theory a curved trace is better
[07:46:07] <LeoNerd> It only really makes a difference up above the 1GHz mark
[07:46:23] <LeoNerd> I'm usually working at 20M max, clock on the AVR
[07:46:40] <Tom_itx> never pushed one to 1Ghz?
[07:47:40] <LeoNerd> No :)
[09:25:47] <t4nk608> hi could anyone check the uart communication part plz :)
[09:25:48] <t4nk608> http://pastebin.com/EHcusTZk
[09:26:37] <t4nk608> im trying to send the ADC signals which are stored in the variable "result" to send over serial line, but its not working.. i try to convert it from int to string with sprintf()
[09:27:23] <t4nk608> if i write instead buffer, only 'h' in the usart function below, then i can send only this letter, but else its not working
[09:29:19] <LeoNerd> This paste seems to be missing half the code to actually understand it
[09:31:46] <t4nk608> only last part is important with the usart_write_wait(&usart_instance, buffer);
[09:32:03] <LeoNerd> Sure. That's just a function call
[09:32:14] <t4nk608> i try to send the result variable where the ADC value from 0-4095 is stored over serial line
[09:32:18] <LeoNerd> What is usart_write_wait() ? you didn't supply the code for it; so we can't see what it's actually doing
[09:33:19] <t4nk608> it s a default setting .. so actually i dont no really how its working :D i have no idea about that all.. just try to understand it with http://asf.atmel.com/docs/3.16.0/samd21/html/group__asfdoc__sam0__sercom__usart__group.html#gaee8b142e8ad13e1e226334a9954e853c
[14:55:31] <dpy> hi guys
[14:55:47] <dpy> anyone here who builds his own toolchain for avr-gcc?
[14:59:41] <dpy> oh, wait, this doesn't look right: [...]wn-linux-gnu --host=avr --target=avr -
[15:00:05] <dpy> last time I checked, my laptop was running amd64, not avr
[15:00:07] <dpy> :D
[15:33:39] <hetii> HI :)
[15:34:08] <hetii> Maybe some of you know some embended board that wil be able drive DSI display for eg from LG p880
[15:34:09] <hetii> ?
[15:39:06] * LeoNerd receives shiney new tiny841
[16:37:34] <malinus> dpy: lol
[16:38:36] <malinus> hetii: have you already reverse engineerned the display?
[16:39:47] <aandrew> hetii: yes, I have one that breaks it out but there's no control. I was going to be using a little MachXO2 or Cyclone IV FPGA for it
[16:39:58] <aandrew> Mike from Mike's Electric Stuff did some excellent work reversing it
[16:40:01] <aandrew> let me dig it up for you
[16:40:14] <aandrew> https://www.mixdown.ca/redmine/projects/ipodnano6breakout
[16:40:22] <aandrew> that's my board but there's a link to Mike's work from it
[16:40:55] <aandrew> I've done some MIPI CSI work, DSI isn't much different
[16:41:48] <hetii> malinus: I plan to build http://hackaday.com/2014/08/19/a-mipi-dsi-display-shieldhdmi-adapter/
[16:42:10] <hetii> it uses LG P880 display so all signal you have it already
[16:42:27] <hetii> just the point is if raspberry can handle it on software side
[16:42:45] <aandrew> does that board have any brains in it?
[16:42:52] <aandrew> if not your Arduino will never drive DSI
[16:43:06] <aandrew> however if the board accepts high level commands (draw primitives) then no problem
[16:43:24] <hetii> I dont use arduino.
[16:43:42] <aandrew> wtf
[16:43:52] <aandrew> I swear you said arduino. I must be blind
[16:44:01] <aandrew> sorry, you clearly said rPi
[16:46:23] <hetii> no problem :) and I mix channels, cause though that talk in #raspberrypi :)
[16:47:15] <malinus> hetii: look like you need a FPGA no matter what.
[16:47:28] <aandrew> malinus: Mike did it with a little PIC
[16:47:33] <aandrew> he was abusing the protocol mind you
[16:47:34] <hetii> but never mind, general Tomasz who design this FPGA -> DSI converter plan to handle it by rasspbery also
[16:47:38] <aandrew> but enough that it would still work
[16:48:08] <aandrew> er no, I think he used a CPLD but it's all done with a PIC IIRC
[16:48:25] <hetii> but it`s not what I need. I will use it for my DIY projector with 100W led :)
[16:48:26] <malinus> aandrew: iirc that wasn't a dumb DSI
[16:49:05] <aandrew> hm?
[16:49:11] <aandrew> DSI is DSI
[16:49:59] <hetii> well I need at least 720p in my display.
[16:51:27] <malinus> hetii: may I ask, what kind of application a very small display with a big resolution, and a relativly big volume of hardware, has?
[16:52:45] <aandrew> I think he mentioned a projector? I'd be curious how hot that 100W LED will get :-)
[16:53:12] <malinus> oh, that sounds cool
[16:53:14] <aandrew> I'd love to get a 1080P pico projector; think hotel room multi-monitor :-)
[16:53:38] <aandrew> a pelican case with a folded tripod, two pico projectors, power strip and usb3 hub
[16:55:23] <malinus> aandrew: is it possible to the rspi to receive the hdmi signal?
[16:55:26] <malinus> *for
[16:55:49] <aandrew> malinus: I forget exactly what is on an RPi for connectivity; I thought it has a CSI port (for camera) but HDMI *receiver* not to my knowledge
[16:57:11] <malinus> aandrew: what do you plan for the "receiver" part of the projector then?
[17:00:02] <aandrew> it's not my project. I'm saying for my little dream I need two 1080p pico projectors. hetii isn't designing them for me, I don't think :-(
[17:00:35] <malinus> haha
[17:00:40] <malinus> got it :)
[17:03:09] <Romzetron> Sparkfun AVR pocket programmer showed up today
[17:03:14] <Romzetron> finally graduating from arduino
[17:24:59] <hetii> re
[17:25:04] <hetii> What I miss ?
[17:25:35] <hetii> aandrew: I be happy If I get result similar like here: http://www.pinoydvd.com/index.php/topic,30370.150.html
[17:26:42] <hetii> http://s224.photobucket.com/user/hertzblaster/media/N070ICG%20new%20build/photo70.jpg.html
[17:26:57] <hetii> 7 inch 1280x800 128w LED
[17:30:00] <Valen> hetii: my god do these people not know how to trim a reply?
[17:32:02] <hetii> ye, I notice this same :)
[17:33:12] <hetii> ok another topic: Maybe some of you try this wifi ? http://tinyurl.com/qhywp7q
[17:33:46] <hetii> I wonder about capability of his I2S interface
[17:50:05] <hetii> hmm looks like some marketing bullshit with this I2S interface :/
[17:54:45] <Lambda_Aurigae> hetii, i2s is basically just i2c used for audio interchip communication.
[17:56:42] <Lambda_Aurigae> only, it's not i2c.
[17:58:46] <Lambda_Aurigae> it actually looks more like spi with an added word select line.
[17:59:05] <hetii> Lambda_Aurigae: but you mean that by i2c i could drive i2s endpoint?
[17:59:26] <Lambda_Aurigae> well, I would have thought so as I once saw i2c and i2s on the same pins on a microcontroller.
[17:59:53] <Lambda_Aurigae> but it's looking more like i2s is more like a multi-master spi, kindasorta.
[18:00:02] <Lambda_Aurigae> just reading the philips specifications.
[18:00:28] <Lambda_Aurigae> you have a continuous serial clock.
[18:00:28] <hetii> ok but inside can be some AHB matrix or whatever else that make it working.
[18:00:55] <Lambda_Aurigae> and something pulls the WS line low and starts sending data clocked by the continuous clock.
[18:01:06] <Lambda_Aurigae> no idea what an AHB matrix is.
[18:02:14] <Lambda_Aurigae> https://sparkfun.com/datasheets/BreakoutBoards/I2SBUS.pdf
[18:02:15] <hetii> Lambda_Aurigae: general some IO registers where you can define the role of the pin. GPIO/SSP/UART etc...
[18:04:05] <LeoNerd> PIC18s have those
[18:04:27] <Lambda_Aurigae> some of the new ones do, yeah.
[18:05:29] <hetii> hmm now i wonder if would be possible to grab some I2S DAC like ES9023 and control it by spi interface ?
[18:05:57] <Lambda_Aurigae> hetii, not quite...you should look at that pdf I posted.
[18:06:07] <Lambda_Aurigae> it could be done via some bitbanging of gpio pins though.
[18:06:24] <Lambda_Aurigae> maybe an USI could be hackified into driving it but not sure.
[18:06:34] <Lambda_Aurigae> USI is a royal pain anyhow.
[18:06:59] <LeoNerd> I find USI quite fine for SPI
[18:08:02] <Lambda_Aurigae> LeoNerd, yeah....I
[18:08:12] <Lambda_Aurigae> I'm just trying to figure out how it could be used for i2s.
[18:08:28] <hetii> cool, I will need play a bit with that on some days.
[18:08:47] <Lambda_Aurigae> i2s protocol is really quite simple once you read that document.
[18:08:51] <LeoNerd> I2S looks basically like SPI with an additional word clock
[18:09:07] <Lambda_Aurigae> specially if you are only accessing one device
[18:10:06] <hetii> if there will not be some timming limitation then why not :)