#avr | Logs for 2014-10-25

Back
[02:15:24] <twnqx> so i was at worldsemi's offices today
[02:16:03] <twnqx> hard to think that such a small company can deliver such a bug share of the RGB lighting
[02:16:05] <twnqx> big*
[02:38:32] <rue_shop2> http://www.analog.com/library/analogdialogue/archives/44-02/touch_screen.html
[02:38:39] <rue_shop2> who thinks that looks pretty easy!
[02:39:23] <rue_shop2> http://dangerousprototypes.com/2012/01/07/4-wire-and-8-wire-resistive-touch-screen-controller-using-the-msp430/
[02:39:25] <rue_shop2> mmm yup
[02:39:37] <rue_shop2> maybe i can use all the touch screens I'm collecting from copiers
[02:42:58] <rue_shop3> 4 ports
[02:43:01] <rue_shop3> 2 analog
[02:43:09] <rue_shop3> mmmm
[05:07:11] <LeoNerd> Good morning all... Asides maybe myself and RikusW, does anyone here know much on HVSP? I'm wanting to think out loud a little
[06:15:11] <twnqx> rue_house, rue_shop2, rue_shop3, rue_bed-aok: did you see http://pastebin.com/TV2gHC9s ?
[06:59:43] <Lambda_Aurigae> rue_shop2, I have a pile of similar screens with touchscreen from copiers...trying to reverse engineer the display interface first..the touchscreens should be much simpler.
[07:03:28] <Lambda_Aurigae> http://hackaday.com/2014/10/25/an-sdk-for-the-esp8266-wifi-chip/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+hackaday%2FLgoM+%28Hack+a+Day%29
[07:09:51] <twnqx> i have ten of those right here :3
[07:10:03] <twnqx> 5$... so overpriced
[07:11:58] <Lambda_Aurigae> oh?
[07:12:03] <Lambda_Aurigae> what's wrong with them?
[07:12:23] <Lambda_Aurigae> I was thinking of ordering 4 of them soon.
[07:12:28] <twnqx> i paid half of that :P
[07:12:30] <Lambda_Aurigae> specially now that the sdk is available.
[07:12:47] <Lambda_Aurigae> well, if you can buy them in china directly, yeah, they are cheaper.
[07:16:16] <twnqx> i also bought a few thousand WS2812B today...
[07:17:05] <Lambda_Aurigae> not much of a budget for toys here.
[07:17:25] <twnqx> well, the two reels are for a friend's online shop, so he pays
[07:17:31] <twnqx> that alone makes 2000
[07:18:08] <twnqx> and 550 of the ones that have some form of fabrication are for another friend
[07:18:29] * twnqx would not really have a use for two reels of LEDs...
[07:20:53] <Lambda_Aurigae> I would.
[07:21:26] <Lambda_Aurigae> whole house mood lighting!
[07:21:38] <twnqx> ummm
[07:22:01] <twnqx> those LEDs are itting pretty hard
[07:22:12] <twnqx> 72W for a pack of 240
[07:22:12] <Lambda_Aurigae> itting?
[07:22:16] <twnqx> hitting
[07:22:19] <Lambda_Aurigae> oh.
[07:22:48] <Lambda_Aurigae> so, I need to kick up to a 500A service for the building then?
[07:24:02] <twnqx> nah, just 600W for 2000 :P
[07:24:36] <twnqx> or 120A @ 5V
[07:26:43] <twnqx> hm
[07:26:47] <twnqx> that means...
[07:27:41] <twnqx> the 345600 LEDs for a 16:9 DVD resolution panel would consume 104kW
[07:34:49] <Lambda_Aurigae> definitely would need an upgrade to my service for that.
[07:35:40] <twnqx> well, just don't run them all-white :P
[09:09:49] <MarkX> morning
[09:10:03] <Lambda_Aurigae> mourning
[09:12:14] <Lambda_Aurigae> what can we do you out of this fine and glorious morning MarkX ?
[09:12:26] <Lambda_Aurigae> oh, and talk to someone else because I have to go clean out my truck.
[09:12:26] <Lambda_Aurigae> later.
[09:12:43] <MarkX> lmao! good luck!
[09:13:05] <MarkX> i don't need anything. just idleing here. will probably bug N1njAway as usual
[09:13:11] <MarkX> later on
[09:16:33] <Lambda_Aurigae> back.
[09:16:37] <Lambda_Aurigae> for a couple minutes.
[09:16:41] <Lambda_Aurigae> have to wait for a phone call.
[11:21:32] <eatyourguitar> is there a DSPIC room on freenode?
[11:38:04] <Tom_shop> eatyourguitar try ##dsp
[11:38:29] <eatyourguitar> ok thanks
[12:09:26] <LeoNerd> Ugh.. A 165 doesn't make a very good SPI-readable SR
[12:09:32] <LeoNerd> The lines are all awkward
[13:16:06] <LeoNerd> I am increasingly convinced that /nooooobody/ makes an SPI-compatible Pload shift register
[13:16:45] <LeoNerd> It ought not be that hard.. SDO hiZ when SS high. On the SS high->low transition, latch the Qn inputs into the SR, then use CLK input to shift those bits out of SDO. Done.
[13:17:10] <LeoNerd> No SR that I can find has that logic... everything I can see needs a separate step somehow to make it "capture" the parallel load
[13:17:34] <LeoNerd> The otherwise-awesome 74'299 still needs a clock pulse when in parallel load mode.
[13:17:43] <LeoNerd> The 165 is just silly
[15:14:39] <megal0maniac> Hello trusty AVR people :)
[15:16:15] <megal0maniac> Quick question, I want to print out a hex value in the format 0x00 using sprintf. %x gives me the first nibble. How do I get both? Will I have to store the byte in a temp variable and shift it 4 places, or is there a better way?
[15:21:11] <Tom_itx> something like %2d or such.. i forget
[15:22:17] <Tom_itx> or maybe %2x ?
[15:22:19] <Tom_itx> i dunno
[15:23:34] <megal0maniac> Looks like it's %02X. One sec
[15:23:58] <megal0maniac> \o/
[15:24:01] <megal0maniac> Thanks, Tom_itx
[15:24:21] <megal0maniac> Needed a shove in the right direction
[15:39:38] <Tom_itx> np
[16:02:49] * megal0maniac waves at RikusW
[16:04:30] <megal0maniac> I've made a nifty little interactive console for speaking to the NRF24L01+
[16:05:17] <megal0maniac> Serial to SPI bridge of sorts, but the serial is human-readable. So I can manually configure this thing byte by byte and learn how it ticks
[16:09:58] <megal0maniac> Every so often the output breaks, but it's getting there
[16:10:01] <malinus> megal0maniac: that's what I'm doing with SD_card
[16:11:53] <megal0maniac> Nice!
[16:16:21] <malinus> well I'm not really using serial, but rather virtual serial (since it has usb).
[16:18:30] <megal0maniac> Ah. Yeah, this is using actual serial. What USB stack are you using?
[16:20:41] <RikusW> hi megal0maniac
[16:22:23] <megal0maniac> I'm learning what a pain in the arse it is to have dynamic packet lengths :P
[16:22:32] <RikusW> heh
[16:22:50] <RikusW> over usb ?
[16:23:39] <RikusW> or the nrf ?
[16:24:09] <megal0maniac> In the AVR code to deal with receiving/transmitting data
[16:24:29] <megal0maniac> 1 byte at a time is trivial. More gets complicated
[16:24:41] <megal0maniac> Well, when you only know the length at runtime
[16:25:18] <RikusW> use framing like the stk500 does ?
[16:25:42] <RikusW> there is a header telling you the amount of bytes to follow
[16:26:33] <RikusW> getting data from the PC byte by byte is ok, the m32u2 does the buffering
[16:27:03] <megal0maniac> Thank goodness for asynchronous communication :P
[16:27:22] <RikusW> when sending back to the pc you have to use the putc_nf and then putc or flush
[16:27:47] <megal0maniac> There's a single byte register on the NRF which tells you what the payload length is
[16:28:24] <RikusW> and putc_nf will autoflush once the 32 byte buffer is full
[16:28:29] <megal0maniac> I'm busy using a bare 328p with USB-Serial
[16:28:36] <megal0maniac> So just AVR stuff
[16:28:45] <RikusW> its only after the last byte of the frame that you have to manually flush
[16:28:52] <RikusW> ah
[16:29:11] * RikusW though you were using the U2S
[16:29:20] <megal0maniac> I figured as much :)
[16:29:32] <megal0maniac> USB is just more stuff to go wrong at the moment
[16:29:41] <megal0maniac> I have a crap load to get done by Friday
[16:29:43] <RikusW> I got a CH340 usb-serial cable yesterday in a pakistani shop for R40
[16:30:30] <RikusW> seems the chinese indians and pakistanis are taking over rural towns these days....
[16:30:45] <megal0maniac> Haha! Nice. I had one too. Gave it to the company I was working for after I turned it into a debug cable for a credit card machine :)
[16:30:57] <megal0maniac> It was RS232 signalling, so inverted. Useless to me
[16:31:07] <megal0maniac> Yeah, they're everywhere now...
[16:32:49] <RikusW> I can still sort of remember how the town was 20 - 25 years ago, its much different now... :/
[16:33:09] <RikusW> it lost its character...
[16:34:05] <RikusW> lots of small messy looking shops now...
[16:37:09] * RikusW goes back to watching bones
[16:39:26] <megal0maniac> Most places are like that. Kimberley is a good example
[20:38:33] <nhere> i am trying ATtiny167, but i cannot pass even the simplest test - turn leds on
[20:38:39] <nhere> PORTB = 7;
[20:38:52] <nhere> this makes led blink instead of turning them on
[20:39:08] <nhere> what am i missing?
[20:43:51] <nhere> http://pastebin.com/iNpZxQV8
[20:48:48] <nhere> the only thing that comes to my mind is that uC is resetting itself, but i don't know how to check if that is the case
[21:01:07] <cmtptr> well first off, that's a lot of code to just turn on an LED
[21:01:24] <cmtptr> second, put a while (1); at the end
[21:03:36] <cmtptr> nhere, most or probably all of those registers are set to 0 on powerup or reset, and 0<<anything is pointless
[21:04:09] <nhere> that's what codevision avr has generated
[21:04:21] <cmtptr> weird
[21:04:32] <nhere> i can get rid of most of that
[21:04:42] <nhere> just to test
[21:04:52] <cmtptr> I don't think it's hurting anything
[21:05:02] <cmtptr> I was just pointing out that it's a lot of clutter
[21:05:15] <nhere> yeah, agree
[21:13:41] <nhere> what a bummer, i have wasted more than an hour trying to find what is going on, and it was power supply that was faulty
[21:14:47] <nhere> btw, i have see this notation: PORTB.1 = 1; how is that dot called? i would like to read about it a bit
[21:17:12] <Tom_itx> i don't use that method
[21:18:27] <nhere> is it because you don't like it, or it is not a good practise?
[21:19:11] <Tom_itx> just don't use it myself
[22:11:09] <[F_F]> hi
[22:29:30] <rue_shop2> you can do it with bitstructs
[22:30:05] <rue_shop2> typedef struct port_s{ unsigned int hmmm, or not
[23:05:48] <[F_F]> is there really a point in using C++ with AVR?
[23:06:11] <twnqx> for some there is
[23:06:39] <twnqx> though i guess most peopl ewill answer straight "no"
[23:07:34] <Tom_itx> no