EmbeddedRelated.com
Forums

Getting started with AVR and C

Started by Robert Roland November 24, 2012
On Wed, 05 Dec 2012 07:55:04 -0500, Walter Banks
<walter@bytecraft.com> wrote:

> > >Jon Kirwan wrote: > >> On Tue, 04 Dec 2012 20:34:12 -0500, Walter Banks >> <walter@bytecraft.com> wrote: >> >> >Jon Kirwan wrote: >> > >> >> On Sat, 1 Dec 2012 17:33:23 -0800, Mark Borgerson >> >> <mborgerson@comcast.net> wrote: >> >> >> >> >In article <mpskb8pu8guc6detar3j0j0vajr44fobko@4ax.com>, >> >> >jonk@infinitefactors.org says... >> >> >> >> >> >> On Sat, 01 Dec 2012 08:00:50 -0500, Ed Beroset >> >> >> <beroset@mindspring.com> wrote: >> >> >> >> >> >> >Jon Kirwan wrote: >> >> >> >> On Sat, 01 Dec 2012 10:08:42 +0200, upsidedown@downunder.com >> >> >> >> wrote: >> >> >> >> >> >> >> >>> These were completely mechanical (including serial to parallel and >> >> >> >>> parallel to serial conversion) and the only semiconductors were the >> >> >> >>> power supply rectifier diodes and the transistor in the 20 mA constant >> >> >> >>> current supply :-). >> >> >> >> >> >> >> >> Yup. >> >> >> >> >> >> >> >> Damn. Now I need to see if anyone has one to sell. Crap. My >> >> >> >> wife is going to hate it. Luckily, I've got over 7000 sq ft >> >> >> >> of space here, so I should be able to find some corner for >> >> >> >> it. If I can find one. Would be fun to clean one up and get >> >> >> >> it working, if the problems weren't too fundamental after all >> >> >> >> these years. >> >> >> > >> >> >> >Up until very recently (this summer) I had quite a bit of old computer >> >> >> >stuff. I have sold or given away much of it now, which helps assure >> >> >> >domestic tranquility. The 9-track tape drives were about as big as a >> >> >> >refrigerator, but heavier... Still have an ADM-3A terminal and other >> >> >> >70s era computing ephemera, but I let the most bulky stuff go, so I >> >> >> >still have the tape drive manuals and the PDP-8 manuals but not the >> >> >> >devices. >> >> >> >> >> >> You still have your ADM-3A!!?! Wow. I built one of my own >> >> >> from the kit that Lear Siegler offered, around the time I >> >> >> also built my Altair 8800 from kit. (I was WAY TOO POOR to >> >> >> just go buy assembled stuff at the time.) It was so wonderful >> >> >> to have that ADM-3A. I don't even know where it went, now. >> >> >> >> >> >> Now that brings back pleasant memories. I used that thing >> >> >> like crazy for years. It saved my life when writing programs >> >> >> under CP/M, for example. Or using Microsoft's paper tape >> >> >> BASIC. (Hmm... I bet I still have a Persei drive maybe and >> >> >> maybe also some old 8" floppies with Microsoft's BASIC on >> >> >> them.....) >> >> >> >> >> >> >Someone should write a VR TTY simulator that includes realistic sound. >> >> >> >Here's a video clip of a model 28 in action: >> >> >> >http://www.youtube.com/watch?v=D1ng6v9UMw8 >> >> >> >> >> >> hehe. The mechanisms aren't as impressive as the 35. But it's >> >> >> nice to see that. I never used or saw a 28, though. Thanks! >> >> >> >> >> >> I still have my old DECtapes in plastic cases around here -- >> >> >> no tape drive for them, though. So there they sit. >> >> >> >> >> >> I'm going to build another tape reader and tape punch, >> >> >> though. The reader is easy. It's the punch dies for the tape >> >> >> punch that will set me back, time wise. I think to think >> >> >> about the design some more. But I want to design, make, and >> >> >> build that project. My son would benefit from it and I'd >> >> >> enjoy it. >> >> >> >> >> >Mechanical dies???? A couple hundred Watts of CO2 laser, >> >> >a rotating drum mirror, and an AVR for timing should >> >> >suffice! ;-) (Bonus prize---no chad---hanging or otherwise) >> >> >> >> Hmm. Although I lose out on the memory of the sound of it, >> >> there is an advantage to your suggestion. I could also then >> >> use it to laser cut plywood and other slabs of wood, do art >> >> work, and so on. Wonder if tilting the rotating mirror would >> >> then let me do scan lines without having to move a heavy >> >> target on a table. >> >> >> >> Nah. The paper is oiled well. Probably would catch fire on >> >> me. And if it didn't, the hole rim would be darkened and I'm >> >> not sure what that does to some of the readers. Wouldn't feel >> >> right, either. >> >> >> >> I think drill rod is the right way to go, don't you? :) >> > >> >I think it is better to use Mark's 21st century solution :) >> >With that you should be able to engineer a Tbyte life >> >instead a 100K byte life for a mechanical punch that would >> >cost more to implement :) Probably 100-1000 times as >> >fast. >> >> Hehe. I'm tempted. A little scary setting up a few hundred >> watts of 10 micron IR beam, though. (or is it 15 micron?) >> Anyway, don't these things COST A LOT? (Like thousands of >> dollars for the tubes?) >> >> Here's a 20W tube: >> http://www.amazing1.com/burning-lasers.htm >> >> And that by itself is $400. >> >> Here's another, more expensive one: >> >> http://www.lightobject.com/High-Quality-Reci-80W90W-CO2-Sealed-Laser-Tube10000Hrs-P118.aspx >> >> I've no idea how long these tubes last. Their warranties >> appear to be no more than 10 months, though. So I'm betting >> on replacement once per year or more often, ignorant as I am >> of these beasts. >> >> Do you have any specific recommendations about how to keep >> the costs down, the power adequate, and the precision >> appropriate for the task of cutting precision holes in thick, >> oiled paper? >> >> I'm still thinking drill rod, myself. It's not as though I'm >> going to be cutting out Tbytes on paper tape. I think the >> rolls are only from one supplier: >> >> http://www.westnc.com/paper-tape-rolls.html >> >> With shipping, it's $415.51 for (28) 1000' rolls. So 28000' >> or 3.36 megabyte for only $415.51. A terrabyte would cost me >> merely $123,663,690.00. That, plus the CO2 laser and >> operating costs. >> >> ... would put me only slightly over budget! >> >> You wouldn't happen to have some lucrative projects around, >> would you, where I could earn enough for this hobby? >> >> >On another group recently someone calculated the >> >volume and read times for a TByte on cards >> >> ;) >> >> >The other contest would be to design and implement >> >a reliable Rube Goldberg. My entry is Roman 5 flag >> >signaling to remote output on cuneiform tablet >> >engraving and baking in Baghdad. >> >> Hehe. >> >> I think I'll just get serious about drill rods and have >> somewhat more modest fun. I can't afford these hobbies of >> yours!! A terrabyte done on paper tape! Cripes. > >Many years ago (1972 I think) I bought 4 PDP-11's and >negotiated main memory down to $1 per byte and became >an 11 second hero. Yesterday I was in a hardware store >that had scattered all over the store stocking stuffer >8G thumb drives for $7.95 and also scatted all over >the store LED flashlights for $8.95. Who would have >believed in 1972 an unimaginable amount of storage >for less than the cost of a flashlight. > >If you are serious about drill rod it will be a a real learning >exercise in metal physics, strength of materials, >lubrication. A good starting point might be the art >and science of Samurai swords. > >Remember while you are at it that the cost each >roll of paper tape would buy two 8G thumb drives. > >I smell coffee.. > >Good Luck :)
If it were the case that I was looking at these as storage of programs, rather than a fun experience, I'd use a flash drive or a local server system. (Well, I actually DO use them.) But this is about the experiences. I don't mind making it easier on myself (for example, buying an already existing punch head with solenoids, too) and then adding electronics to the rest. But it's not about storage. Well, except perhaps things I may want to have survive 1000 years, perhaps (can't do that with DVDs, CDs, or any other magnetic media that I'm aware of -- paper is amazing stuff for really long term storage.) I'm not afraid of the learning exercises. By the time I was 20, I'd built three telescopes (1000s of hrs of work on each, grinding and then testing the figure and then more grinding, etc., and then the rest that makes it serviceable.) I also built my Altair 8800 from the newly available kit and when I later bought the 4k dynamic ram cards that were designed wrong and could not work, I got a huge lesson struggling to fix them (about a dozen patches I made to get them going.) And I didn't know enough about how dynamic ram worked, when I started, either. So unknowns are fine. Just need to push through them. Jon
On Wed, 5 Dec 2012 07:52:39 -0800, Mark Borgerson
<mborgerson@comcast.net> wrote:

>In article <vq9tb8p68ukkf8geefabuvv5di8k78hkbg@4ax.com>, >jonk@infinitefactors.org says... >> >> On Tue, 04 Dec 2012 20:34:12 -0500, Walter Banks >> <walter@bytecraft.com> wrote: >> >> >Jon Kirwan wrote: >> > >> >> On Sat, 1 Dec 2012 17:33:23 -0800, Mark Borgerson >> >> <mborgerson@comcast.net> wrote: >> >> >> >> >In article <mpskb8pu8guc6detar3j0j0vajr44fobko@4ax.com>, >> >> >jonk@infinitefactors.org says... >> >> >> >> >> >> On Sat, 01 Dec 2012 08:00:50 -0500, Ed Beroset >> >> >> <beroset@mindspring.com> wrote: >> >> >> >> >> >> >Jon Kirwan wrote: >> >> >> >> On Sat, 01 Dec 2012 10:08:42 +0200, upsidedown@downunder.com >> >> >> >> wrote: >> >> >> >> >> >> >> >>> These were completely mechanical (including serial to parallel and >> >> >> >>> parallel to serial conversion) and the only semiconductors were the >> >> >> >>> power supply rectifier diodes and the transistor in the 20 mA constant >> >> >> >>> current supply :-). >> >> >> >> >> >> >> >> Yup. >> >> >> >> >> >> >> >> Damn. Now I need to see if anyone has one to sell. Crap. My >> >> >> >> wife is going to hate it. Luckily, I've got over 7000 sq ft >> >> >> >> of space here, so I should be able to find some corner for >> >> >> >> it. If I can find one. Would be fun to clean one up and get >> >> >> >> it working, if the problems weren't too fundamental after all >> >> >> >> these years. >> >> >> > >> >> >> >Up until very recently (this summer) I had quite a bit of old computer >> >> >> >stuff. I have sold or given away much of it now, which helps assure >> >> >> >domestic tranquility. The 9-track tape drives were about as big as a >> >> >> >refrigerator, but heavier... Still have an ADM-3A terminal and other >> >> >> >70s era computing ephemera, but I let the most bulky stuff go, so I >> >> >> >still have the tape drive manuals and the PDP-8 manuals but not the >> >> >> >devices. >> >> >> >> >> >> You still have your ADM-3A!!?! Wow. I built one of my own >> >> >> from the kit that Lear Siegler offered, around the time I >> >> >> also built my Altair 8800 from kit. (I was WAY TOO POOR to >> >> >> just go buy assembled stuff at the time.) It was so wonderful >> >> >> to have that ADM-3A. I don't even know where it went, now. >> >> >> >> >> >> Now that brings back pleasant memories. I used that thing >> >> >> like crazy for years. It saved my life when writing programs >> >> >> under CP/M, for example. Or using Microsoft's paper tape >> >> >> BASIC. (Hmm... I bet I still have a Persei drive maybe and >> >> >> maybe also some old 8" floppies with Microsoft's BASIC on >> >> >> them.....) >> >> >> >> >> >> >Someone should write a VR TTY simulator that includes realistic sound. >> >> >> >Here's a video clip of a model 28 in action: >> >> >> >http://www.youtube.com/watch?v=D1ng6v9UMw8 >> >> >> >> >> >> hehe. The mechanisms aren't as impressive as the 35. But it's >> >> >> nice to see that. I never used or saw a 28, though. Thanks! >> >> >> >> >> >> I still have my old DECtapes in plastic cases around here -- >> >> >> no tape drive for them, though. So there they sit. >> >> >> >> >> >> I'm going to build another tape reader and tape punch, >> >> >> though. The reader is easy. It's the punch dies for the tape >> >> >> punch that will set me back, time wise. I think to think >> >> >> about the design some more. But I want to design, make, and >> >> >> build that project. My son would benefit from it and I'd >> >> >> enjoy it. >> >> >> >> >> >Mechanical dies???? A couple hundred Watts of CO2 laser, >> >> >a rotating drum mirror, and an AVR for timing should >> >> >suffice! ;-) (Bonus prize---no chad---hanging or otherwise) >> >> >> >> Hmm. Although I lose out on the memory of the sound of it, >> >> there is an advantage to your suggestion. I could also then >> >> use it to laser cut plywood and other slabs of wood, do art >> >> work, and so on. Wonder if tilting the rotating mirror would >> >> then let me do scan lines without having to move a heavy >> >> target on a table. >> >> >> >> Nah. The paper is oiled well. Probably would catch fire on >> >> me. And if it didn't, the hole rim would be darkened and I'm >> >> not sure what that does to some of the readers. Wouldn't feel >> >> right, either. >> >> >> >> I think drill rod is the right way to go, don't you? :) >> > >> >I think it is better to use Mark's 21st century solution :) >> >With that you should be able to engineer a Tbyte life >> >instead a 100K byte life for a mechanical punch that would >> >cost more to implement :) Probably 100-1000 times as >> >fast. >> >> Hehe. I'm tempted. A little scary setting up a few hundred >> watts of 10 micron IR beam, though. (or is it 15 micron?) >> Anyway, don't these things COST A LOT? (Like thousands of >> dollars for the tubes?) >> >> Here's a 20W tube: >> http://www.amazing1.com/burning-lasers.htm >> >> And that by itself is $400. >> >> Here's another, more expensive one: >> >> http://www.lightobject.com/High-Quality-Reci-80W90W-CO2-Sealed-Laser-Tube10000Hrs-P118.aspx >> >> I've no idea how long these tubes last. Their warranties >> appear to be no more than 10 months, though. So I'm betting >> on replacement once per year or more often, ignorant as I am >> of these beasts. >> >> Do you have any specific recommendations about how to keep >> the costs down, the power adequate, and the precision >> appropriate for the task of cutting precision holes in thick, >> oiled paper? >> >> I'm still thinking drill rod, myself. It's not as though I'm >> going to be cutting out Tbytes on paper tape. I think the >> rolls are only from one supplier: >> >> http://www.westnc.com/paper-tape-rolls.html >> >> With shipping, it's $415.51 for (28) 1000' rolls. So 28000' >> or 3.36 megabyte for only $415.51. A terrabyte would cost me >> merely $123,663,690.00. That, plus the CO2 laser and >> operating costs. >> >> ... would put me only slightly over budget! >> >> You wouldn't happen to have some lucrative projects around, >> would you, where I could earn enough for this hobby? >> >> >On another group recently someone calculated the >> >volume and read times for a TByte on cards >> >> ;) >> >> >The other contest would be to design and implement >> >a reliable Rube Goldberg. My entry is Roman 5 flag >> >signaling to remote output on cuneiform tablet >> >engraving and baking in Baghdad. >> >> Hehe. >> >> I think I'll just get serious about drill rods and have >> somewhat more modest fun. I can't afford these hobbies of >> yours!! A terrabyte done on paper tape! Cripes. >> >If it's the paper tape that is the key, not the method >of storing data, perhaps a paradigm shift is in order. > >1. you could lower the laser power to the point where >you just char the paper a bit and use an optical reader. > >2. Use an ink-jet print head to print the 'holes' >and an optical sensor to read the tape.
Yeah, but the reader I'm building uses a linear lamp overhead and a glass stirring rod to focus it onto the holes, with sensor LEDs underneath. I guess I could consider working on things so that it works okay with either holes or "inked" dots. Might not be too hard to do. Will think on it. But I lose the ability to have good storage for millennia. Holes in papertape will easily last a millenia, and more. Maybe I want to communicate with neo-humans 10,000 years from now and say "hi," eh?
>IIRC, fast optical readers showed up near the end of >the paper tape era. I think there were even plans >for do-it-yourself readers in the magazines of the >time. If I get time, I'll take a look in some of >my magazines from the era. (I saved the ones that >printed my articles.)
I built my own optical reader in the late 1970's. Hand pulled, though. I used the sprocket holes to create a trigger pulse to sample the other holes, so it didn't matter that much how fast I pulled. Mostly, I just didn't want the tear the papertape. (I could not afford to buy stuff, then. Raised very poor, lived in homes without walls, had to work the fields to survive as a kid. So I wasn't like young adults born in middle class families who could just go out and buy a reader or a punch or an assembled computer, etc. I had to make almost every finished product I got to own. This included the ADM-3A that someone else mentioned -- I could only barely manage the kit cost.) Jon
On Wed, 05 Dec 2012 21:28:03 +0200, upsidedown@downunder.com
wrote:

>On Wed, 5 Dec 2012 07:52:39 -0800, Mark Borgerson ><mborgerson@comcast.net> wrote: > >>IIRC, fast optical readers showed up near the end of >>the paper tape era. > >Before optical readers, there were fast capacitive readers with paper >speeds of several meters per second, thus several kilobytes/s, filling >the core memory with operating system and program in tens of seconds. > >You could get deep nasty wounds, if you accidently touched the fast >moving paper tape. Thus, it was a good idea to use gloves, when >operating the paper tape reader.
Now there's a thought. I never got close enough to the fast ones, except rarely. And I didn't know how they operated. But I did, at the time, understand how to make an optical one work and made my own. (It is long gone, now.) I hadn't even considered a capacitive approach. Could you elaborate a bit on this?? I'm interested in the approach -- particularly the sensor/transducer part of it and perhaps the 1st stage concerns (the rest of the amplification and electronics I think I can work out.) Jon
On Wed, 05 Dec 2012 12:21:17 -0800, Jon Kirwan
<jonk@infinitefactors.org> wrote:

>>Before optical readers, there were fast capacitive readers with paper >>speeds of several meters per second, thus several kilobytes/s, filling >>the core memory with operating system and program in tens of seconds. >> >>You could get deep nasty wounds, if you accidently touched the fast >>moving paper tape. Thus, it was a good idea to use gloves, when >>operating the paper tape reader. > >Now there's a thought. I never got close enough to the fast >ones, except rarely. And I didn't know how they operated. But >I did, at the time, understand how to make an optical one >work and made my own. (It is long gone, now.) I hadn't even >considered a capacitive approach. > >Could you elaborate a bit on this?? I'm interested in the >approach -- particularly the sensor/transducer part of it and >perhaps the 1st stage concerns (the rest of the amplification >and electronics I think I can work out.)
I have never seen any schematics for these beasts, but they had 8 (or more likely also a 9th for the feed hole) trimmer capacitors very close to the read head. My guess is that some kind of bridge construction was used, with the actual sensor and the trimmer capacitor at opposite side of a bridge circuit.
On Wed, 05 Dec 2012 12:17:50 -0800, Jon Kirwan
<jonk@infinitefactors.org> wrote:

> >But I lose the ability to have good storage for millennia. >Holes in papertape will easily last a millenia, and more. >Maybe I want to communicate with neo-humans 10,000 years from >now and say "hi," eh?
I guess a punched card (with a serial number in columns 73-80) made from some more durable material would be a good way to send such messages.
On 5.12.12 11:05 , upsidedown@downunder.com wrote:
> On Wed, 05 Dec 2012 12:21:17 -0800, Jon Kirwan > <jonk@infinitefactors.org> wrote: > >>> Before optical readers, there were fast capacitive readers with paper >>> speeds of several meters per second, thus several kilobytes/s, filling >>> the core memory with operating system and program in tens of seconds. >>> >>> You could get deep nasty wounds, if you accidently touched the fast >>> moving paper tape. Thus, it was a good idea to use gloves, when >>> operating the paper tape reader. >> >> Now there's a thought. I never got close enough to the fast >> ones, except rarely. And I didn't know how they operated. But >> I did, at the time, understand how to make an optical one >> work and made my own. (It is long gone, now.) I hadn't even >> considered a capacitive approach. >> >> Could you elaborate a bit on this?? I'm interested in the >> approach -- particularly the sensor/transducer part of it and >> perhaps the 1st stage concerns (the rest of the amplification >> and electronics I think I can work out.) > > I have never seen any schematics for these beasts, but they had 8 (or > more likely also a 9th for the feed hole) trimmer capacitors very > close to the read head. > > My guess is that some kind of bridge construction was used, with the > actual sensor and the trimmer capacitor at opposite side of a bridge > circuit.
I used a Facit reader (500 / 1000 characters/s) in late 1960's. It was nearly the very best available. There was a row of pins flush with the tape transport plane, 8 larger for data and the ninth smaller for feed holes, which were between 3th and 4th data holes. There was a common electrode on top of the tape (in the tape path cover). The cover electrode was fed with a 500 kHz signal, and the pins were connected to the opposite phase of the feed with trimmer capacitors, so there was a bunch of 9 capacitance bridges. The bridges were adjusted to balance with a fully-punched piece of tape in place. For feeding the tape, there was a capstan rotating at the reader speed, and in the cover there was a bearing for pushing the tape against the capstan. The bearing was pulled by a armature lever and a electromagnet when there was a need to feed. For quick stopping, there was a similar lever before the reading position, without the bearing and capstan. This mechanism allowed the sub-millisecond timing needed for the speed. The ultimate tape reader was built by Danish Regnecentralen. It solved the question of very abrupt motion of the paper tape and reels needed for top speed. There were servo-controlled reels for input and output tape, and the feed was performed with a servo-controlled capstan. The whole mechanism resembled that of the 1/2 inch magnetic tape drives. Also, there was a FIFO buffer in the electronics, and its filling level was used to control the servos. The top speed was 2000 characters / s. -- Tauno Voipio
Jon Kirwan wrote:

> But I lose the ability to have good storage for millennia. > Holes in papertape will easily last a millenia, and more. > Maybe I want to communicate with neo-humans 10,000 years from > now and say "hi," eh?
The holes will probably outlast the tape. "Time Team" is one of my favorite shows, and they're continually trying to deduce, since dirt right here is a slightly different color from the dirt over there, that Saxons must have built something out of wood. Mel.
On 12-12-05 23:22 , Tauno Voipio wrote:

> The ultimate tape reader was built by Danish Regnecentralen. > It solved the question of very abrupt motion of the paper > tape and reels needed for top speed. There were servo-controlled > reels for input and output tape, and the feed was performed > with a servo-controlled capstan. The whole mechanism resembled > that of the 1/2 inch magnetic tape drives. Also, there was a > FIFO buffer in the electronics, and its filling level was used > to control the servos. The top speed was 2000 characters / s.
The WW II code-breaking computer Colossus read its paper tape at 5000 characters per second. They had run with up to 9700 characters per second before the tape broke. But the Colossus tape was a fixed loop, endlessly repeating, not a long tape on a reel. And the speed was constant, not start-and-stop, so high speed was easier. Ref: http://en.wikipedia.org/wiki/Colossus_computer -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .
On Wed, 05 Dec 2012 16:32:15 -0500, Mel Wilson
<mwilson@the-wire.com> wrote:

>Jon Kirwan wrote: > >> But I lose the ability to have good storage for millennia. >> Holes in papertape will easily last a millenia, and more. >> Maybe I want to communicate with neo-humans 10,000 years from >> now and say "hi," eh? > >The holes will probably outlast the tape. "Time Team" is one of my favorite >shows, and they're continually trying to deduce, since dirt right here is a >slightly different color from the dirt over there, that Saxons must have >built something out of wood. > > Mel.
Cool, yet another reason for holes rather than ink spots on paper. Jon
On Wed, 05 Dec 2012 23:10:14 +0200, upsidedown@downunder.com
wrote:

>On Wed, 05 Dec 2012 12:17:50 -0800, Jon Kirwan ><jonk@infinitefactors.org> wrote: > >>But I lose the ability to have good storage for millennia. >>Holes in papertape will easily last a millenia, and more. >>Maybe I want to communicate with neo-humans 10,000 years from >>now and say "hi," eh? > >I guess a punched card (with a serial number in columns 73-80) made >from some more durable material would be a good way to send such >messages.
Ah. The difference between ancient paged codices and scrolls. Hmm. Do I want future historians to handle codices or scrolls of mine? Must think on that problem. ;) Jon