new to the 6502 of things
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: new to the 6502 of things
CAN bus is mandated in California since the 2008 model year (at least for cars and light-duty trucks), but internal hardware specifics are beyond the scope of my work. Around here, Powertrain Control Modules (aka engine computers) are tested by 'scoping pin voltages and currents at the external connectors and are replaced as a complete unit if any internal issues are encountered. Fiddling about with the emissions firmware is not well tolerated in California either, so I generally avoid that can of worms. There are pass-through programming devices called "J2534", but I use mine only for diagnostics, not modifications.
I work in a poor neighborhood, so the average hooptie that stumbles in here for inspections and repairs is close to twenty years old and has had little or no competent maintenance during its difficult life. California's weather has a way of preserving vehicles that probably would have or should have rusted out to the scrapyard elsewhere.
I work in a poor neighborhood, so the average hooptie that stumbles in here for inspections and repairs is close to twenty years old and has had little or no competent maintenance during its difficult life. California's weather has a way of preserving vehicles that probably would have or should have rusted out to the scrapyard elsewhere.
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)
Mike B. (about me) (learning how to github)
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: new to the 6502 of things
plasmo wrote:
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
Bill
Cosworth does however... their current line of ECUs specify the MCP565 running at 56 MHz, which is an option over the standard 40 MHz version. The NXP Datasheet is very detailed... and this is pretty much a MCU made just for usage in an ECU.
I know that Lotus have worked with various ECU providers... GEMS, Cosworth, etc., with their more recent ECUs being a custom product from EFI. These are in the Elise, Exige and Evora models. They are heavily locked down however... so it's not trivial to re-program them.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
-
oscilloscope
- Posts: 16
- Joined: 14 Sep 2021
Re: new to the 6502 of things
plasmo wrote:
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
Bill
it all depends on the ECU for instance it ranges from tricore Infineon , to nec/renesas , and various other brands of processors / microprocessors. all a pain as most of the ecu's made today always have faults with the circuitry. bad solder joints , inferior soldering.
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: new to the 6502 of things
floobydust wrote:
I know that Lotus have worked with various ECU providers... GEMS, Cosworth, etc., with their more recent ECUs being a custom product from EFI. These are in the Elise, Exige and Evora models. They are heavily locked down however... so it's not trivial to re-program them.
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)
Mike B. (about me) (learning how to github)
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: new to the 6502 of things
barrym95838 wrote:
floobydust wrote:
I know that Lotus have worked with various ECU providers... GEMS, Cosworth, etc., with their more recent ECUs being a custom product from EFI. These are in the Elise, Exige and Evora models. They are heavily locked down however... so it's not trivial to re-program them.
Emissions testing every other year... interesting. Up in NJ (which is a great place to be from) we had full car inspections every year. Down in FL (here since '84) we had emissions testing only for a short period of time, then it went away (we should have some state standard however). Still.... I keep all of my cars running perfectly
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: new to the 6502 of things
I saw a 2ZZ-GE in a Celica GTS at the wrecking yard last year, and I was really tempted to snag it all up for my MR-2. But the exhaust system would have almost certainly caused me to delete the trunk, which I value highly, even though I would still have the little frunk. I'm probably going to try to go with the heavier but torquey 5S-FE that was used in the following generation ... less buzz, more beef. I may possibly have access to a complete 1MZ-FE setup from a Solara, but I don't want that little car to wind up being my (or my wife's) coffin.
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)
Mike B. (about me) (learning how to github)
-
oscilloscope
- Posts: 16
- Joined: 14 Sep 2021
Re: new to the 6502 of things
GARTHWILSON wrote:
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.
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.
i discovered on ebay n Introduction to Microcomputers - Volume 0 - Adam Osborne 1977 , would i assume that i should start from 0? as zero is a value ?:P
Re: new to the 6502 of things
Looks like that was written later, as a prequel. So not an integral part of the original work. Whether it works well as a beginner's introduction, I don't know. Certainly between 1975 and 1977 there was quite a shift in popularity and motivation for getting involved in microcomputers. So it could be for a different audience - perhaps less technically adept, perhaps more motivated by curiosity than professional interest.
-
oscilloscope
- Posts: 16
- Joined: 14 Sep 2021
Re: new to the 6502 of things
BigEd wrote:
Looks like that was written later, as a prequel. So not an integral part of the original work. Whether it works well as a beginner's introduction, I don't know. Certainly between 1975 and 1977 there was quite a shift in popularity and motivation for getting involved in microcomputers. So it could be for a different audience - perhaps less technically adept, perhaps more motivated by curiosity than professional interest.
i searched around on eBay i did indeed find the correct one but they where massively over priced. i found it in the end on a book site. for half the price of eBay. , i'll get reading once its here.
-
oscilloscope
- Posts: 16
- Joined: 14 Sep 2021
Re: new to the 6502 of things
so i have been on the hunt for further books , i found the book that was recommended to me by @BigEd
i later found another book Teach Yourself Assembler (Teach Yourself Visually)
i really want to learn assembly but it seems very very confusing to me. fingers crossed i get there in the end.
i later found another book Teach Yourself Assembler (Teach Yourself Visually)
i really want to learn assembly but it seems very very confusing to me. fingers crossed i get there in the end.
Re: new to the 6502 of things
It's a website rather than a book, but if you search for easy6502 it's a tutorial in one big page, and you can run your code in the browser. Learn by doing!
Edit: there's a whole list here of online tutorials and primers.
Edit: also a list here of books. Some of which can be found online, for example:
Edit: some books also found on Atari Archive (with author permission). For example
Edit: there's a whole list here of online tutorials and primers.
Edit: also a list here of books. Some of which can be found online, for example:
- Rodnay Zaks Programming the 6502
Lance Leventhal 6502 Assembly Language Programming
Edit: some books also found on Atari Archive (with author permission). For example
- Richard Mansfield Machine Language For Beginners
-
oscilloscope
- Posts: 16
- Joined: 14 Sep 2021
Re: new to the 6502 of things
so... one of the books i have ordered has arrived , the other one is coming from the states which isn't here yet.
so the book that did arrive is "an introduction to microcomputers volume 1 basic concepts".... So i had all knowledge guns blazing!!
i found afew mistakes in the book , firstly there was one regarding the "on " "off" representation of the switches / gates etc! , i am aware there is gates and they perform the calculation but!
the fig 2.1 suggests its the other way round. So 1 is infact off , and 0 is on. now unless i have completely had this round the wrong way for years and years. , i always figured that connected / on / making a circuit. "1" etc etc , means "ON" , and open circuit is "OFF" wait there is more!
so this next page is abit annoying , as its explaining to me about binary , and the representation of base TEN , there is a rather annoying part which explains the mathematical approach to how base TEN is used for letters i think. ? , i had to sit there and think what is the "little i , j , k." next to the little d , and then it twigged. "decimal" and then.. the letter i was trying to picture in my mind what the numbers for the binary grid... are. , the 1 ,2 ,4 , 8 , 16 , 32 , 64 , 128... , so far this book is not easy to navigate and i guess its meant for the reader to really think about it so it stays in your mind. food for thought kinda deal. , on the plus side it only cost me £4.50 , where as alot of the ones on eBay are going for £25+
i'll solder on with the book is just about annoying with the spelling mistakes and the terms used.
p.s sorry folks i don't know why the pictures are side ways as there not when i uploaded them
so the book that did arrive is "an introduction to microcomputers volume 1 basic concepts".... So i had all knowledge guns blazing!!
i found afew mistakes in the book , firstly there was one regarding the "on " "off" representation of the switches / gates etc! , i am aware there is gates and they perform the calculation but!
the fig 2.1 suggests its the other way round. So 1 is infact off , and 0 is on. now unless i have completely had this round the wrong way for years and years. , i always figured that connected / on / making a circuit. "1" etc etc , means "ON" , and open circuit is "OFF" wait there is more!
so this next page is abit annoying , as its explaining to me about binary , and the representation of base TEN , there is a rather annoying part which explains the mathematical approach to how base TEN is used for letters i think. ? , i had to sit there and think what is the "little i , j , k." next to the little d , and then it twigged. "decimal" and then.. the letter i was trying to picture in my mind what the numbers for the binary grid... are. , the 1 ,2 ,4 , 8 , 16 , 32 , 64 , 128... , so far this book is not easy to navigate and i guess its meant for the reader to really think about it so it stays in your mind. food for thought kinda deal. , on the plus side it only cost me £4.50 , where as alot of the ones on eBay are going for £25+
i'll solder on with the book is just about annoying with the spelling mistakes and the terms used.
p.s sorry folks i don't know why the pictures are side ways as there not when i uploaded them
Re: new to the 6502 of things
oscilloscope wrote:
the fig 2.1 suggests its the other way round. So 1 is infact off , and 0 is on. now unless i have completely had this round the wrong way for years and years. , i always figured that connected / on / making a circuit. "1" etc etc , means "ON" , and open circuit is "OFF".
In a real circuit, there will be transistors instead of switches, but they serve the same purpose: effectively connecting one wire to another (yes, yes, I know, but those details don't matter for this explanation). The "on" or "off" of the transistor or switch doesn't represent a logic level in itself; it's the voltage on the wire that does that. Imagine two switches joined together, with their other ends connected to Vcc and 0V respectively. If the first is closed and the second open, the output will be logical 1. If the second is closed and the first open, it will be 0. The relationship between on/off and logic level is different for each switch - trying to look at it that way is only going to confuse you.
Quote:
so this next page is abit annoying , as its explaining to me about binary , and the representation of base TEN , there is a rather annoying part which explains the mathematical approach to how base TEN is used for letters i think. ? , i had to sit there and think what is the "little i , j , k." next to the little d , and then it twigged. "decimal" and then...
This is showing the general case, so it can't use actual digits 0-9, and uses the letter d instead. Each digit can be different, so we can't use the same variable for all of them. One option would be to use a*B^3 + b*B^2 + c*B^1 + d*B^0, but you run out of letters fairly quickly that way. So it's common to use the same letter for all of them, and distinguish them with subscripts. It would be more common (and I think more useful) to number them, with d_0 on the B^0 place, d_1 on the B^1 place, and so on. But i, j, k, l does the job too.
Re: new to the 6502 of things
John West wrote:
Imagine two switches joined together, with their other ends connected to Vcc and 0V respectively. If the first is closed and the second open, the output will be logical 1. If the second is closed and the first open, it will be 0.
- Attachments
-
- output structures.png (1.8 KiB) Viewed 3209 times
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
-
oscilloscope
- Posts: 16
- Joined: 14 Sep 2021
Re: new to the 6502 of things
hi all
so i haven't made many updates regarding the book i bought recently id hoped it would unfog the 6502 of things for me, and ultimately learn machine language which is my goal and further my machine language learning etc!. , the book i posted some pictures of was becoming very very complicated and was almost turning robotic with is wording and having diagrams which made very little sense. ,now i am getting very disheartened with it as I'm just not "getting it" , i have even resorted to blind reading to my baby while he's still being built & programmed in the womb. he seems to flop about when i am reading it out loud. so i can only guess he's getting it?... I have put that book down for now , and started reading the first book of the series "an introduction to microcomputers" volume 1 , i have now volume "0"
Now this next book (below) is "machine language for beginners" which covers the 6502! woop! , which started out to be pretty interesting it has been referencing a assembler regularly through to the point i am at currently. , I have hit a road block within the book which makes very little sense to me. , i come to page 18 , where its starts explaining about the mnemonic's word's and it starts off very easy. spoon feeding about JMP , and explains that JMP is an op code , "oh juicy i know some about op codes " , then explains that JMP means in poke 76 into ram , "hmm ok simple enough to under stand" , buuuut! page 19 is where it all falls apart... it starts talking about a basic loader which has some various lines of code , but when i read it , it makes little sense to me , as it talks about the DATA line then the decimal numbers , then talks about an address 4096 ok i see that in the basic code , but then starts talking amount address 4000 , eh? and the accumulator which adds2 & 5 then makes 7... i can sys 4096 to execute ML hmmm i thought that's a basic loader. ermmmm? WHAT? it is safe to say i tried to read further on in the book with little clarity and again stopped as i didn't want to keep going without further understanding from what this is meant to mean. page 18
page 19
its probably really easy to see what i am not seeing i jut think i need a healthy push in the right direction.
thanks!
p.s how do i stop it from changing the angle of the picture , i did attempt to change the angle on my end but it keeps auto justifying sideways?
so i haven't made many updates regarding the book i bought recently id hoped it would unfog the 6502 of things for me, and ultimately learn machine language which is my goal and further my machine language learning etc!. , the book i posted some pictures of was becoming very very complicated and was almost turning robotic with is wording and having diagrams which made very little sense. ,now i am getting very disheartened with it as I'm just not "getting it" , i have even resorted to blind reading to my baby while he's still being built & programmed in the womb. he seems to flop about when i am reading it out loud. so i can only guess he's getting it?... I have put that book down for now , and started reading the first book of the series "an introduction to microcomputers" volume 1 , i have now volume "0"
Now this next book (below) is "machine language for beginners" which covers the 6502! woop! , which started out to be pretty interesting it has been referencing a assembler regularly through to the point i am at currently. , I have hit a road block within the book which makes very little sense to me. , i come to page 18 , where its starts explaining about the mnemonic's word's and it starts off very easy. spoon feeding about JMP , and explains that JMP is an op code , "oh juicy i know some about op codes " , then explains that JMP means in poke 76 into ram , "hmm ok simple enough to under stand" , buuuut! page 19 is where it all falls apart... it starts talking about a basic loader which has some various lines of code , but when i read it , it makes little sense to me , as it talks about the DATA line then the decimal numbers , then talks about an address 4096 ok i see that in the basic code , but then starts talking amount address 4000 , eh? and the accumulator which adds2 & 5 then makes 7... i can sys 4096 to execute ML hmmm i thought that's a basic loader. ermmmm? WHAT? it is safe to say i tried to read further on in the book with little clarity and again stopped as i didn't want to keep going without further understanding from what this is meant to mean. page 18
page 19
its probably really easy to see what i am not seeing i jut think i need a healthy push in the right direction.
thanks!
p.s how do i stop it from changing the angle of the picture , i did attempt to change the angle on my end but it keeps auto justifying sideways?