#avr | Logs for 2013-12-17

Back
[03:31:39] <FoxGT> Gah! This junk has such a learning curve!
[03:32:44] <FoxGT> I feel like I'm reading egyptian hieroglyphs.
[03:37:09] <twnqx> lol
[03:37:32] <twnqx> yeah, being old and having learned ont he likes of the C64 and later PC with MSDOS helps :P
[03:43:01] * twnqx taught himself assembly on the C128 from nothing but the shipped manuals
[07:07:44] <FoxGT> twnqx, where do you recommend for a starting point?
[07:08:10] <FoxGT> I've had a computer since '95, but haven't had to do much without a gui
[07:09:11] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[07:10:09] <Epsilon-Auriga_> FoxGT: what are you trying to do/learn?
[07:10:32] <Epsilon-Auriga_> by 1995 I was on to my 4th or 5th generation of computers.
[07:10:58] <FoxGT> Lol
[07:11:04] <Tom_itx> that just makes you an ole fart
[07:11:11] <Epsilon-Auriga_> damned right!
[07:11:21] <Epsilon-Auriga_> now get your blinky lights off my lawn damned kids.
[07:11:45] <Tachyon`> lol
[07:11:49] <Tachyon`> ever used the spectrum?
[07:11:54] <Epsilon-Auriga_> hell, I'm only 46.
[07:11:54] <FoxGT> Learn to program these avrs! I got my programmer from Tom_itx, but I've never done anything with microcontrollers. The extent of my knowledge is timers/transistors/counters/ect...
[07:12:04] <FoxGT> I've never done any c programming
[07:12:10] <Epsilon-Auriga_> ok.
[07:12:21] <Epsilon-Auriga_> there is a book...the C programming language
[07:12:27] <Tachyon`> by K&R
[07:12:30] <Epsilon-Auriga_> get it, read it,
[07:12:31] <Tom_itx> FoxGT so read the link i gave you
[07:12:40] <Epsilon-Auriga_> the guys who wrote it are the ones who created C
[07:12:43] <Tachyon`> although only K is still with us -.-
[07:12:58] <Epsilon-Auriga_> it's what I learned C on back in the late 80s.
[07:13:07] <Tachyon`> it's still the bible today, lol
[07:13:11] <Epsilon-Auriga_> yup.
[07:13:23] <Tachyon`> although you'd want at least second edition (with the ANSI C stamp on the cover) or perhaps third
[07:13:27] <FoxGT> http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628
[07:13:27] <FoxGT> ?
[07:13:32] <Tachyon`> ah, there it is
[07:13:50] <FoxGT> Sweeeet!
[07:13:52] <Tom_itx> FoxGT, also find the menu links 'Dean Camera's Articles' and read them as well
[07:13:54] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/index.php
[07:14:17] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/c_bits/bits_index.php
[07:14:19] <Tom_itx> then read that
[07:14:23] <Epsilon-Auriga_> and Tom_itx has some nice beginning tutorials for the actual AVR.
[07:14:34] <Tachyon`> Epsilon-Auriga_, you in the UK?
[07:14:38] <FoxGT> I've looked at several, that was where I felt lost. lol
[07:14:42] <Epsilon-Auriga_> USA
[07:14:46] <Epsilon-Auriga_> Iowa
[07:14:52] <Tachyon`> ah right, you won't remember the spectrum computer then
[07:14:56] <Epsilon-Auriga_> FoxGT: first thing is to learn C.
[07:14:58] <FoxGT> Thanks guy!
[07:15:04] <Epsilon-Auriga_> Tachyon`: of course I do.
[07:15:05] <Tachyon`> all c64s over there iirc
[07:15:06] <FoxGT> guys*
[07:15:06] <Tachyon`> ahh
[07:15:14] <Epsilon-Auriga_> zx81 spectrum?
[07:15:22] <Tachyon`> the ZX81 was followed by the spectrum
[07:15:23] <Tom_itx> FoxGT THEN when you're all done reading that, MEMORIZE this: http://tom-itx.dyndns.org:81/~webpage/pdf/K&R_C_2nd.pdf
[07:15:31] <Tachyon`> I stated on the ZX81, or TS-1000 as it was known there I think
[07:15:35] <Epsilon-Auriga_> little thing with membrane keyboard
[07:15:37] <Epsilon-Auriga_> I had one.
[07:15:40] <Tachyon`> ah yes
[07:15:48] <Tachyon`> http://zx.kupo.be - I put that up recently
[07:15:49] <Epsilon-Auriga_> and the 16K expansion.
[07:15:54] <FoxGT> Honest opinion. Going from knowing nothing to having to learn C, safe to assume it will be quite a while before I have my first controller programmed?
[07:15:55] <Tachyon`> people are still making spectrum hardware
[07:16:14] <Epsilon-Auriga_> FoxGT: depends on how you are at learning.
[07:16:22] <Tom_itx> not if you follow those steps
[07:16:24] <Epsilon-Auriga_> C is very easy to learn...and difficult to master.
[07:16:28] <FoxGT> Awesome!... generally
[07:16:42] <FoxGT> Tom, the links you sent in that order?
[07:16:42] <Tachyon`> over 30 yeras after the first spectrum released
[07:16:45] <Epsilon-Auriga_> read that pdf Tom_itx just posted...that will teach you C from the ground up.
[07:16:47] <MrMobius> ya, C is easy to do badly but dont worry about that at the beginning
[07:16:52] <Tom_itx> pretty much
[07:17:00] <Tom_itx> you may have to mix a few to understand the first ones
[07:17:16] <Epsilon-Auriga_> and you can use the K&R C book/pdf as a reference when looking at the other stuff.
[07:17:34] <Epsilon-Auriga_> I actually have a physical copy..my first ever copy of that book even.
[07:17:41] <Tom_itx> so do i
[07:18:14] <Epsilon-Auriga_> was given to me in 1998 by the project leader of the NDS system from Sandia National Labs.
[07:18:26] <FoxGT> Awesome stuff! I need to print this & go sit in a well lit corner for a few weeks.
[07:18:33] <Epsilon-Auriga_> NDS being a 14 million dollar package aboard the 60million dollar GPS satellites.
[07:18:43] <FoxGT> Oh, Tom, can you reset fuses with your programmer?
[07:18:54] <Epsilon-Auriga_> if you can't read through that book in 2 days then you need remedial reading learning first.
[07:18:58] <FoxGT> Or is that what the addon part was for?
[07:19:05] <FoxGT> lol
[07:19:13] <Epsilon-Auriga_> tom's programmer will do fuses and programming.
[07:19:18] <Tom_itx> yes
[07:19:19] <FoxGT> <-- full time student & worker.
[07:19:29] <Epsilon-Auriga_> fuses are just a separate section of flash, just like program memory....
[07:19:38] <Epsilon-Auriga_> but be very very very VERY careful playing with fuses.
[07:19:46] <FoxGT> Ah
[07:19:50] <Epsilon-Auriga_> you can make the chip totally unresponsive with them.
[07:19:50] <Tom_itx> don't go screwin with the fuses unless you are SURE you know what they do
[07:19:57] <Epsilon-Auriga_> by doing things like turning the reset pin off.
[07:20:09] <FoxGT> Not good. :(
[07:20:22] <Epsilon-Auriga_> there are ways to get around anything you can do with fuses.
[07:20:35] <Epsilon-Auriga_> but you need a high voltage programmer for some of them,,which that one from Tom_itx does not do.
[07:20:38] <FoxGT> My worry was accidentally doing it, I am pretty ignorant to these microcontrollers.
[07:21:09] <Tom_itx> my examples use the internal oscillator so you won't need to worry about fuses much
[07:21:12] <Epsilon-Auriga_> read the C book first....get an understanding of the language..then look through those other links and read the datasheet for the chip you are using.
[07:21:25] <FoxGT> I have the programmer & bought a couple different avrs to start with, but I'm too ignorant to play with them, currently.
[07:21:35] <Epsilon-Auriga_> the datasheets for AVR are the best datasheets I've ever seen.
[07:21:37] <Tom_itx> which avrs did you get?
[07:21:49] <Epsilon-Auriga_> they even include code samples in both C and assembly.
[07:22:00] <Epsilon-Auriga_> ok..must go to work now.
[07:22:17] <Epsilon-Auriga_> catch ya all in a few dozen tens of minutes or so..
[07:22:19] <FoxGT> tiny85 & mega16
[07:22:25] <Epsilon-Auriga_> or 9 or so hours.
[07:22:28] <FoxGT> 5 of each
[07:22:45] <Tom_itx> the 16 should do ok for those examples
[07:22:54] <Epsilon-Auriga_> get atmega1284p when you can afford one or three....lots of flash, lots of sram, awesome chip all around.
[07:23:00] <Tom_itx> you will have to mod a few things for the programs to work
[07:23:34] <FoxGT> I can order some other ones.
[07:23:34] <Tom_itx> no need to fly to the moon when you can't paddle a canoe
[07:24:19] <Tom_itx> if you want to follow the examples, the 88 or 168 would be a good choice
[07:24:38] <Tom_itx> or even the 328 which just has more memory
[07:25:01] <Tom_itx> and they come in DIP
[07:25:45] <FoxGT> whichever makes it easier.
[07:25:53] <FoxGT> I have two 168's in my cart!
[07:26:14] <Tom_itx> then you won't need to mod the programs
[07:26:26] <Tom_itx> otherwise to work on the 16 you would need to mod a few things
[07:26:43] <FoxGT> Do you guys get these off of ebay or some site?
[07:26:54] * twnqx wonders if Tachyon` uses that nick on quakenet, too
[07:26:55] <Tom_itx> i avoid ebay for avrs
[07:27:11] <Tom_itx> i generally get stuff from digikey or mouser
[07:27:14] <Tachyon`> nope, I've never used quakenet but you're the second person to ask me that
[07:27:45] <twnqx> right, .be != .fi :P
[07:27:52] <Tom_itx> in small quantities of course: http://tom-itx.dyndns.org:81/~webpage/boards/new_batch/USB_chips.jpg
[07:28:09] <FoxGT> Lol
[07:28:22] <FoxGT> jeebus
[07:28:52] <FoxGT> the "20PU" is the pin orientation, isn't it?
[07:29:02] <Tom_itx> 20 is the clock
[07:29:06] <Tom_itx> PU is the package
[07:29:17] <twnqx> might also inlcude voltage, no?
[07:29:23] <Tom_itx> could be
[07:29:26] <twnqx> i think i saw that yesterday when looking at mega8
[07:29:39] <Tom_itx> the data sheet will tell you all that
[07:29:44] <Tachyon`> I'm in the UK anyway, just kupo.be was substantially cheaper than kupo.anything else short
[07:29:47] <Tom_itx> near the back
[07:30:08] <Tachyon`> example, kupo.ie was over 10 times the price
[07:30:37] <Tachyon`> you can't buy .uk dmains sadly, only .org.uk etc.
[07:33:28] <Tom_itx> i'm out.
[07:33:33] <FoxGT> tom, have you had bad experiences with ebay versions?
[07:34:02] <Tom_itx> you can try them, i know ppl that use em
[07:34:11] <Tom_itx> i wouldn't put them in a product
[07:34:20] <Tom_itx> if you're just playing i suppose it's ok
[07:34:39] <Tom_itx> no way to trace the source
[07:34:54] <FoxGT> Ah
[07:36:53] <twnqx> Tachyon`: i read that changed a week ago or two
[07:37:55] <Tachyon`> only for big companies with deep pockets
[07:44:03] <sabesto> anyone know of a good graphic lcd library?
[07:44:20] <sabesto> simple 128x32 mono display
[10:18:54] <amee2k> okay, i think i need some help on that one o.o
[10:20:43] <amee2k> i've got an arduino nano 3.0, and used my avrisp to flash it (link to image follows) with a bootloader and set the fuses with "-Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xda:m -Ulfuse:w:0xff:m". it shows up as an FTDI serial port, but if i try to use that as an STK500 mk.1 programmer, i get "programmer not responding" errors.
[10:20:49] <amee2k> what am i doing wrong here?
[10:21:06] <amee2k> promised link to bootloader image that i used: http://roboticsclub.org/redmine/projects/quadrotor/repository/revisions/58d82c77908eee0e1c222f7b38691e6532deb77b/entry/arduino-1.0/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex
[16:06:40] <braincracker> hi
[16:13:07] <bss36504> hi
[16:13:12] <bss36504> ghost town in here today
[16:15:22] <braincracker> yes i seen 2 around here too
[16:15:36] <braincracker> it is quite common nowadays, usa, russia
[16:15:39] <braincracker> ...
[16:17:57] <bss36504> har har
[16:18:37] <braincracker> you not like ghost towns ?
[16:19:30] <braincracker> Americas newest ghost town 2010_aug_28 http://www.youtube.com/watch?v=bm1AjFVATJU Picher, Oklahoma-Modern Day Ghost Town 2010 apr 25 http://www.youtube.com/watch?v=3lhbiRnGMm0
[17:21:21] <kdehl> Seriously, aren't there any parallel (not serial!) 7-segment display controllers that don't just decode BCD?
[17:22:48] <kdehl> Hah. I found some that display Cyrillic.
[17:23:17] <antto> джакпот
[17:23:54] <N1njaneer> kdehl: What are you trying to do?
[17:25:41] <prpplague> kdehl: use a 595 shift register and you can generate what ever you want
[17:28:43] <kdehl> prpplague: Sounds so overly complex.
[17:28:55] <prpplague> kdehl: hehe
[17:28:59] <prpplague> kdehl: not really
[17:29:00] <kdehl> N1njaneer: Just a debugger, I figured I'll need it sooner or later.
[17:29:04] <prpplague> kdehl: plenty of examples
[17:29:17] <prpplague> kdehl: 595 with 7-seg goes back decades
[17:29:19] <kdehl> Well, since there are so many BCD to 7-segment display drivers, I wonder why it was so hard to find a hex version.
[17:29:28] <kdehl> But I found some. I think...
[17:30:35] <kdehl> DM9368
[17:30:39] <kdehl> Expensive though.
[17:32:34] <N1njaneer> There are far better methods these days to drive 7-segment displays which are far more cost-effective.
[17:33:02] <kdehl> Than a single chip?
[17:34:06] <N1njaneer> The DM9368 is also obsolete and EOL so you may not be able to get them anymore
[17:35:27] <kdehl> Yeah, ebay has them, but for a cost.
[17:35:42] <N1njaneer> There are a number of single-chip solutions which will drive a number of 7-seg displays at once if you want to TDM them, else there are a lot of single, serial-cascadable constant-current driver chips which are extremely inexpensive which will do the same thing. Or just buy the 7-seg displays that have the drivers built in.
[17:36:45] <kdehl> I saw those constant-current driver chips, but only BCD again.
[17:36:49] <kdehl> Do you know of any hex versions?
[17:38:24] <N1njaneer> If you just use something like a TLC5971 then you can control each segment individually and make whatever characters you want since you have discreet control.
[17:39:29] <kdehl> Hm. Sounds a little overkill, but I guess it'll work.
[17:40:07] <N1njaneer> Alternatively go on DigiKey.com and search for "7 seg driver" and then click "PMIC - Display Drivers" and look at your dozens of options.
[17:41:09] <kdehl> Ah. Thanks!
[17:41:29] <N1njaneer> Lots of auto-updating refreshing ones.
[17:42:25] <Kev-> Does anyone here remember a part I can use to measure vacuum? I have a vacuum sealer and I want to redo the control panel in AVR..
[17:42:45] <kdehl> N1njaneer: All of the non-surface mounted ones are BCD...
[17:43:45] <N1njaneer> Kev-: There are some nice differential pressure sensors out there which will do exact what you want.
[17:43:47] <kdehl> All of them are...
[17:43:48] <kdehl> Hrm.
[17:44:05] <N1njaneer> kdehl: All we use around here are SMT parts. If you can't work with SMT, you can always solder to an adapter board :)
[17:45:52] <kdehl> N1njaneer: Yeah. I'm prepared to try it for this one! :)
[17:46:41] <Kev-> N1njaneer, something like that mpx2010 could do that?
[17:47:45] <N1njaneer> Let me go look at one of them on the pick and places to see who the manufacturer is.
[17:50:01] <N1njaneer> Kev- Search ebay for "SMC ZSE40" as a good starting point. There's a number out there, and you can find some used ones for cheap.
[17:51:51] <Kev-> Hmm these are switches?
[17:52:19] <N1njaneer> Search the datasheet for that part - there is a version that has a 1-5V analog output that gives you a linear reading of the vacuum level. Also depending on your application and how you are doing it, you might just want to use the set-point directly on the switch in order to trigger something - they also have NPN/PNP outputs.
[17:52:58] <N1njaneer> ZSE40(F)/ISE40-xxx is probably what you want.
[17:53:14] <N1njaneer> But there you go at least for a starting point. SMC makes some good stuff.
[17:54:34] <kdehl> Man. The MC14495P1 even has internal 290-ohm resistors!
[17:54:44] <N1njaneer> Yup. :)
[17:54:51] <N1njaneer> Good stuffs :)
[17:55:22] <N1njaneer> And of course if you're hardcore, you just drive the entire array as a matrix of segments with NPN/PNPs and run them off GPIO from an AVR. Have done that a number of times :)
[17:55:23] <braincracker> i'd hook up 595's for each 7seg+dp display. and serial all up
[17:55:39] <braincracker> works nice.
[17:55:46] <Kev-> Thanks N1njaneer, I'll definitely look at those
[17:56:02] <N1njaneer> No prob!
[17:56:15] <N1njaneer> Let us know how your project goes. :)
[17:56:24] <N1njaneer> Back to programming hundreds of AVRs here :)
[17:56:33] <N1njaneer> New boards just out of the oven.
[17:56:42] <N1njaneer> Like cookies,
[17:56:44] <N1njaneer> !
[17:56:46] <braincracker> salted ?
[17:56:51] <N1njaneer> If only they SMELLED like cookies.
[17:56:52] <Kev-> I will.. Once I hear back from DHL... They broke my vacuum sealer, I should get a new one, and I can use the (barely) broken one to tinker with
[17:57:07] <Kev-> $1200 80lb unit and they dropped it during transit..
[17:57:10] <kdehl> braincracker: Yeah, but then I need '597s to get the data in too. Seems like such a hassle.
[17:57:12] <tzanger> N1njaneer: you're clearly using the wrong flux.
[17:57:27] <braincracker> kdehl<= why would you ?
[17:57:41] <braincracker> 595's can e clocked in any length
[17:58:08] <braincracker> you can have 1024 digits if you want
[17:58:12] <braincracker> it will be just slow
[17:59:54] <kdehl> braincracker: I have a 4-bit bus whose value I just want to dump on a display.
[18:00:28] <kdehl> Man, both the MC14495P1 and the DM9368 are $20 for 5 pcs.
[18:01:04] <braincracker> data en latch clock
[18:01:09] <braincracker> i use these
[18:01:20] <braincracker> works fine
[18:02:07] <braincracker> i remember en can be tied fix too
[18:02:42] <kdehl> braincracker: I don't get it...
[18:04:29] <braincracker> well you connect data, all devices share same clock, you connect en, all devices, and latch - all devices, then second 595 gets data from first 595's carry
[18:04:41] <braincracker> you create a huge shiftregister
[18:04:53] <braincracker> 4 pins, all you need
[18:05:13] <kdehl> Right. But I still need a µC.
[18:05:19] <kdehl> I thought I could do this without one.
[18:05:22] <braincracker> ;/ you don't use one?
[18:05:35] <kdehl> Well, not for this, I didn't plan it, no.
[18:05:38] <kdehl> It's just a debugger.
[18:05:53] <bss36504> ooh I feel accomplished.
[18:06:01] <braincracker> how about an attiny, plus a few 595 then ?
[18:06:11] <kdehl> I mean, I could just connect LEDs to each pin of the data bus. I just figured a nice 7-segment display would be nicer.
[18:06:20] <kdehl> Yeah, that was my first idea.
[18:06:54] <kdehl> No, the thing was just that, I felt because there are so many cheap BCD-to-7-segment display converters, why is it so hard to find hex versions?
[18:06:58] <braincracker> you can use en as pwm fade
[18:07:33] <braincracker> well for that, you just use a table.
[18:07:53] <braincracker> $1 ?
[18:08:09] <braincracker> 595 - $0.5 ?
[18:08:33] <braincracker> i mean attiny $1
[18:09:11] <braincracker> well i'm against the driver ics in this case, a micro is much better.
[18:09:18] <braincracker> you can always reprogram it
[18:09:47] <kdehl> Hm.
[18:09:49] <kdehl> Yeah.
[18:09:52] <kdehl> I suppose.
[18:10:22] <kdehl> I still think it's odd. Such a simple circuit. BCD is plenty, but not hex.
[18:16:24] <kdehl> Well, if I'm going overkill, I could just use a µC with more I/O pins, so that I won't have to use serial communication at all.
[18:23:56] <kdehl> ATTINY24A should should have sufficient number of legs. $1.58.
[21:55:38] -adams.freenode.net:#avr- [freenode-info] channel trolls and no channel staff around to help? please check with freenode support: http://freenode.net/faq.shtml#gettinghelp