6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Nov 12, 2024 9:04 am

All times are UTC




Post new topic Reply to topic  [ 54 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Tue Sep 14, 2021 10:22 pm 
Offline

Joined: Tue Sep 14, 2021 9:37 pm
Posts: 16
hi all...

i had no idea this forum existed so i am hoping i can receive some burning questions i have trying to make heads nor tails of. , i shall give abit of back ground before i unleash my questions. so...
I am a vehicle mechanic , who has had a burning desire to learn programming because i wanted to be able to write my own programs to help me with my job. , probably a tall order but its worth ago so , i tried various programming languages and attempt to get my head around the wording and understandings. ^ be it a teachers or a YouTube video. , it just wouldn't sink in . , so then i discovered a youtuber that spoke about BASIC. so i looked into it , then i thought this is not that bad , I actually quite liked the way it was written ,so naturally i seemed to have gravitated toward BASIC that the vic-20 or c64 has installed. , which lead to to discover the vic-20 &c64 had books which where marketed at children at the time to allow them to learn programing. perfect! I'll try that and find these books which i did , and indeed they did to a certain point... now most of the books i have are" beginner this or beginner that". or "BASIC for beginners ", or "BASIC for such and such"... which then lead me to 6502 machine language... again gave me abit of a false hope as these books are marketed to people who sort of know how to program. so its not really for beginners....

now i have to admit that i have done this totally round the wrong way , i probably should of started what the hardware first then moved on to the software. instead i started reading about the software then linking the wording and action , with the hardware. which is confusing me to no end. so lets break it down.
So i have been learning about AND gates , NOT gates , NAND gates , NOR gates , OR gates. , xtal crystals , TTL chips , TTL logic , all sorts of wonderful words , and what there uses are and kind of getting lost with it all , forgive me if some of the listed above gates are not on a 6502 machine i am merely using it in the story for my learnings , there is afar more i could right that do not make much sense to me i figured id try and keep it briefish...

so i have some questions , hardware questions that have really been annoying me , what is an ALU , uses for a XTRAL crystal (i'll explain more in a moment) , TTL logic , shift register.....
I have been trying to work out what the ALU is for , and i didn't really get a decent enough answer. But i just watched a video of someone working on a mechanical calculator which he called the lower track which shows the ending some a "shift register" , and then he called the input where he placed afew numbers a "accumulator" , so i figured is this just a coincidence that these names where used. :?: am i on the right path on that one?
Xtal crystal.. this one didn't quite make much sense , i understand that there is one , and the computer needs a crystal. or a "clock" , , i also read somewhere that this is almost like the rhythm of a heart beat electronics and keeps the computer moving at a pace :?: . , but! i read today that a "clock" xtal what ever you'd like to call it , is for sync , so everything is sync'd at the right time , so does that mean its not used all the time ? :?:

ok so i'll leave it there ,as i would probably bore the hell out of who ever is going to read this. but i guess i have to start somewhere. so i am hear to learn...well trying too :D


thanks!
Adam


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 14, 2021 11:02 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
Welcome Adam! I'm a fellow "grease monkey", and that's how I make ends meet 40+ hours a week. My love for the 6502 goes back to my high school days in the early 1980s, when I mis-typed a DATA statement in a Moon Landing program from Softside magazine and got dropped into my Apple ][+'s machine language monitor. My hardware chops are a bit limited, but I'd like to think that I have earned at least a tiny bit of recognition for my software creations. There are plenty of friendly, knowledgeable and helpful people here, and they'll be along shortly to assist. In the meantime, I have to get back to work!

Here I am at work (GooglePhobes need not click)

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 12:33 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8539
Location: Southern California
Welcome.

A book I read decades ago that seemed quite good is Adam Osborne's "An Introduction to Microcomputers, Volume 1, Basic Concepts." I have the 2nd Edition on paper, ©Nov 1980, ISBN 0-931988-34-9. It's out of print, but entering the underlined part above into eBay's search bar just now gave me quite a few results, starting just over $5. Another one is Radio Shack's "Understanding Digital Electronics" which is also available on eBay.

Once you get the very basics down, you can go to the 6502 Primer at http://wilsonminesco.com/6502primer/ which has 22 chapters logically organized for building your own 6502 computer.

As for your questions: In spite of being quite experienced with the 6502 and one other processor, I still don't know the reason the accumulator is called that; but it's the main data working register of the processor. "ALU" stands for "arithmetic logic unit," and it does the additions, subtractions, boolean functions, etc. on the data in the accumulator, and puts the results back in the accumulator. A crystal is kind of like a tuning fork. It wants to vibrate at a very exact frequency. By itself, a crystal will not produce any output. There must be active circuitry, which is like the parent pushing a child on a swing. The parent doesn't determine the swing rate, only give the push each time the child comes to the end of the range of motion. (That's simplifying it almost to the point of lying; but you get the idea.) The circuit is called the "oscillator," and the simplest way to get one is to buy a crystal oscillator can which is a little rectangular can with the crystal and the electronics inside and has four pins coming out the bottom. Activities in the processor and the memory and I/O connected to it much be coordinated timingwise, so there's agreement as to when various data are valid, and that there's time to process it before going to the next step, etc.. The clock then becomes kind of the conductor (in the orchestra analogy). In some systems the exact speed won't be critical enough to need a crystal, but there still needs to be a clock. The least-critical speed-control option will usually be a relaxation oscillator using a resistor and capacitor as it time base.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 12:33 am 
Offline

Joined: Thu Jan 21, 2016 7:33 pm
Posts: 279
Location: Placerville, CA
Well now I'm wondering if either of you use the auto-shop SMS I support at my day job :lol: But that's probably getting off-topic...

Curious what applications you have in mind, though ;)


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 2:02 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
barrym95838 wrote:
Welcome Adam! I'm a fellow "grease monkey", and that's how I make ends meet 40+ hours a week. My love for the 6502 goes back to my high school days in the early 1980s, when I mis-typed a DATA statement in a Moon Landing program from Softside magazine and got dropped into my Apple ][+'s machine language monitor. My hardware chops are a bit limited, but I'd like to think that I have earned at least a tiny bit of recognition for my software creations. There are plenty of friendly, knowledgeable and helpful people here, and they'll be along shortly to assist. In the meantime, I have to get back to work!

Here I am at work (GooglePhobes need not click)


Wow, I would have never guessed... I just figured you were a programmer somewhere out in the west, as you've certainly given me a few brilliant pieces of code over the years. I never cared for the "grease monkey" term... and back in the 70's and 80's, it was an inside joke that IBM has tens of thousands of free car mechanics at their disposal... as all CEs (Customer Engineers) drove their personal cars for work, and pretty much every one of us did our own maintenance and repairs. I've been working on cars for almost 50 years now.... here's a couple pics of my current activities:

Attachment:
IMG_2904.jpeg
IMG_2904.jpeg [ 2.22 MiB | Viewed 1788 times ]


Attachment:
IMG_2995.jpeg
IMG_2995.jpeg [ 3.34 MiB | Viewed 1788 times ]


Still a long way to go before reassembly.. but it's a labor of love, hence having cleaned up parts in the living room! Did I mention I live alone in my man cave??

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 2:29 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8482
Location: Midwestern USA
floobydust wrote:
I've been working on cars for almost 50 years now.... here's a couple pics of my current activities...

I'm trying to visualize how that typewriter attaches to the engine.

Speaking of engines, here's the powerplant in my (now mothballed) race car.

Attachment:
racecar07.gif
racecar07.gif [ 1.15 MiB | Viewed 1782 times ]

No typewriters were harmed in the making of the above photo. :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 2:54 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8539
Location: Southern California
oscilloscope, I just came across these online scans of Don Lancaster's old book "Micro Cookbook" which might help. It's not just 6502, but the 6502 is one of the major processors it covers.
Machine Language I: https://www.tinaja.com/ebooks/mlp1cb.pdf
Machine Language II: https://www.tinaja.com/ebooks/mlp2cb.pdf

Edit: The title page of the first one says, "An eBook reprint of chapters 6 and 7 of Micro Cookbook Volume II," and the title page of the second one says, "An eBook reprint of chapters 8 and 9 of Micro Cookbook Volume II."

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 4:58 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
floobydust wrote:
I never cared for the "grease monkey" term... and back in the 70's and 80's, it was an inside joke that IBM has tens of thousands of free car mechanics at their disposal... as all CEs (Customer Engineers) drove their personal cars for work, and pretty much every one of us did our own maintenance and repairs. I've been working on cars for almost 50 years now....

I had second thoughts about that term too ... we're in an age of very sensitive egos, and I'm a bit of a klutz when I try to jest ... I'll just apologize and try to go with "gear head" from now on.

My two pet automotive projects are a 1962 Ford Ranchero custom redesign based on a 1985 Ranger drivetrain and suspension, and a powertrain upgrade for a 1989 Toyota MR-2. Trouble is I haven't driven the Ranchero anywhere under its own power since 1991, and I'm still only about half done. The MR-2 has been waiting patiently for three years now, and I haven't even made any initial progress on that. My work, family and house restoration are my chief concerns now. I don't want to wind up living in one of my vehicles.

@BDD: is that a 427? Where does that crankcase "barf tube" go? To a catch can, I hope ...
@floobydust: yours looks like a GM product too (with a vaguely European feel), but the only GM I know with the starter on top is a NorthStar, and this doesn't look much like one of those to me ... Corvette, maybe?

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 7:39 am 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
GARTHWILSON wrote:
In spite of being quite experienced with the 6502 and one other processor, I still don't know the reason the accumulator is called that; but it's the main data working register of the processor.

I'm pretty sure the term originated in mechanical calculating machines where one register - the accumulator - had numbers added to or subtracted from it. In that sense it "accumulated" the result. The operator would configure numbers to add or subtract in another register, then pull the handle to perform the add or subtract. It's not a direct analog to what happens in the 6502, as you can't add or subtract X or Y, but it seems pretty close.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 8:13 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Welcome, Adam!

There's a book called "But how do it know" which has a companion website and video series, so for the basics of computers you might find that useful:
But How Do It Know (The basic principles of computers for everyone)
Lots of links on that page too.

It's worth bearing in mind that there's a great deal to know if you want to understand computers from top to bottom. But the various layers can be separated: you can become proficient in Basic without knowing about NOR gates, and vice versa. Even if you want to know both, you can learn them separately.

There's a world of distance from a soap-box derby to a world rally championship - don't try to get there in one leap!


Last edited by BigEd on Wed Sep 15, 2021 12:59 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 9:34 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
barrym95838 wrote:
floobydust wrote:
I never cared for the "grease monkey" term... and back in the 70's and 80's, it was an inside joke that IBM has tens of thousands of free car mechanics at their disposal... as all CEs (Customer Engineers) drove their personal cars for work, and pretty much every one of us did our own maintenance and repairs. I've been working on cars for almost 50 years now....

I had second thoughts about that term too ... we're in an age of very sensitive egos, and I'm a bit of a klutz when I try to jest ... I'll just apologize and try to go with "gear head" from now on.

My two pet automotive projects are a 1962 Ford Ranchero custom redesign based on a 1985 Ranger drivetrain and suspension, and a powertrain upgrade for a 1989 Toyota MR-2. Trouble is I haven't driven the Ranchero anywhere under its own power since 1991, and I'm still only about half done. The MR-2 has been waiting patiently for three years now, and I haven't even made any initial progress on that. My work, family and house restoration are my chief concerns now. I don't want to wind up living in one of my vehicles.

@BDD: is that a 427? Where does that crankcase "barf tube" go? To a catch can, I hope ...
@floobydust: yours looks like a GM product too (with a vaguely European feel), but the only GM I know with the starter on top is a NorthStar, and this doesn't look much like one of those to me ... Corvette, maybe?


Well, there are numerous GM sourced bits... starter, alternator, sensors and such, but not truly GM, nor a Corvette... definitely European (albeit no longer EU). It's the back-end of a 2000 Lotus Esprit V8... 3.5 liter, quad-cam 32-valve twin-turbo flat-crank all alloy engine, aka Lotus type 918. It's 21 years old now... and I'm just doing some refurb on it, getting it ready to put up for sale. Oh yea, that's a Renault UN-1 gearbox bolted to it! It's been a fun toy, but I rarely drive it anymore, so time for it to go to a new home.

And wow, one of the first version MR-2s... neat little cars... fun to drive too. Reminds me of the X1/9 a bit, had one of those way back. And I think BDD's is a 427, but I like the FI system with the stacks... But none of this has a 6502 powering it, so sorry for such an off topic set of posts here.

In trying to be supportive in the spirit of the OP.... if Adam happens to have either a Vic-20 or C64, there are numerous books for those which be helpful. Starting with something simple like a Vic-20 (I've got 5 of them) can be a plus. I learned 6502 assembly starting on a Vic with their Vicmon cartridge and technical reference manual. But the book library is loaded with a ton of supporting stuff from Lance Leventhal and many others. Learning the basic parts of the CPU is helpful, but learning what it does from an instruction viewpoint is what ties it together.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 9:56 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
floobydust wrote:
... But none of this has a 6502 powering it, so sorry for such an off topic set of posts here ...

We're going to have to remedy that situation somehow. ElEctric_EyE was working on something a few years back for his personal vehicle, but we haven't heard from him in quite some time. I would love to fabricate a 65c02-based keyless entry system and comfort/convenience/security controller for one of my vehicles, but I need much more of that elusive and precious commodity "time".

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 2:02 pm 
Offline

Joined: Tue Sep 14, 2021 9:37 pm
Posts: 16
wow thanks all. i didn't except such a response , but happy :P

so i'll try and answer some of the questions , and it'll give you an insight of what I would like to learn why i have led my self down this path... , so s i mentioned i am a mechanic based in the UK , so i see mainly euro spec vehicles. and have seen technology has changed alot! , be it electronic hand brakes too DPF emissions technology. , now i have seen more and more electrical faults , electronic modules going bad due to irregular power management , or due to a peripheral causing a electronic module to go bad and causing it to "loose" its programming. , this then led to a sort of dark side of vehicle electronics which includes work around key programming , module sync'ing , and other key related problems , which led me to "finding another way round the problem" , ....annnnd then it let me to hardware that can communicate with the onboard chips and then make it work again , which then would allow me to maximize my profits. as that is why we work right?.. well usually.. for us mear mortal's , So! this got me'a athinkin!. what is these software's scripts written in ? :?: ,i did some research and i discovered that its in the following protentional languages C , c++ , python , where banded around , pascal was mentioned. , these software scripts allow for a kinda one click fix for doing the same job over and over. for example , say i where to take an image dump from a EEPROM drawn from a ST93c46 and i was removing the immobilizer , that would be written in a certain memory location. so i would perform that job over and over again , so when i looked into these "scripts" they looked identical to excel VB scripts , which incidentally i tried having ago at learning about 15 years ago. which i failed miserably to take grasp. , so here we are again , the other reason is to learn how the EEC-IV - EEC-V ecu is written and how to understand its structures to allow for some modifications , (not remapping)


so naturally i gravitated to the 6502 , BASIC & machine language :lol: , as the vic-20 , c64 as they had this chip inside it which seemed far more easier to understand , then modern tech & ecu's , which seems to run on the same sort of. concept.

there was afew books quoted with in some of the comments above, i funnily enough have them on my Ebay watch list , some are massively over priced over here. , i thought id also say that the other reason i am learning this now is due to a back injury and i have been super board. so i figured might aswell now seeing as i have enough time too do it.

regarding car talk etc. , if you wanted to see my YouTube channel that has some of my cars on there , https://youtu.be/lcmy1HGyeLo that is my latest video , i haven't been able to add anything recently due to my back injury.

enjoy

Adam


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 15, 2021 3:16 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8482
Location: Midwestern USA
barrym95838 wrote:
floobydust wrote:
I never cared for the "grease monkey" term... and back in the 70's and 80's, it was an inside joke that IBM has tens of thousands of free car mechanics at their disposal... as all CEs (Customer Engineers) drove their personal cars for work, and pretty much every one of us did our own maintenance and repairs. I've been working on cars for almost 50 years now....

I had second thoughts about that term too ... we're in an age of very sensitive egos, and I'm a bit of a klutz when I try to jest ... I'll just apologize and try to go with "gear head" from now on.

Nothing wrong with "grease monkey." In years past when I was heavily into automotive stuff, not only did I get plenty greasy, I often looked like a deranged monkey as I spun those wrenches. A pox on all this politically-correct BS!

Quote:
@BDD: is that a 427? Where does that crankcase "barf tube" go? To a catch can, I hope ...

It's a 433 inch engine. The block is a heavy-emissions 454 block that came out of a deuce-and-a-half truck (those blocks had four-bolt mains), bored .030" over, with a 427 crank. The rest of the lower end consists of Childs & Albert aluminum rods and J&E forged pistons. Cam is an UltraDyne roller. I have setups for both gas and straight methanol for the fuel injection. The car has been in storage for many years—most of the engine aftermarket parts are no longer produced and the companies that produced them are all pretty much gone.

The crankcase "barf tubes" are connected to the headers' collectors through GM smog pump anti-backfire valves, which act as check valves. The exhaust blast through the collectors produces the suction needed to draw out blow-by gases.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 16, 2021 2:20 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1114
Location: Albuquerque NM USA
Since there are a number of grease monkeys (or gear heads) here, I’m wondering what kind of processors are in engines nowadays. My knowledge is dated, but at one time CPU32 (MC68332, 68376) were used extensively as engine controllers and CAN bus is a common vehicle network. Automotive electronics are pretty conservative field, so newer technology may not have changed the existing electronics much.
Bill


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 54 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: