6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Sep 24, 2024 11:25 pm

All times are UTC




Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Thu Sep 16, 2021 8:28 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1948
Location: Sacramento, CA, USA
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.

_________________
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: Thu Sep 16, 2021 10:08 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1382
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


True, the automotive industry doesn't change that quickly... nor does the energy sector. I've looked at many different 3rd party ECUs over the years... EFI Technology (Italy), Motec (OZ), ECU Master (Eastern Europe, IIRC), Cosworth Engineering (UK), etc. With rare exception, none provide a level of detail that talks about the internals as far as what processor is used.

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 18, 2021 7:48 pm 
Offline

Joined: Tue Sep 14, 2021 9:37 pm
Posts: 16
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



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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 19, 2021 1:32 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1948
Location: Sacramento, CA, USA
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.

Two Elise owners bring their vehicles in to me for their biennial "smog check". They seem to be completely Toyota 2ZZ-GE powered, but I never had to dig deeply enough to see if their ECUs are Toyota too.

_________________
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: Sun Sep 19, 2021 2:27 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1382
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.

Two Elise owners bring their vehicles in to me for their biennial "smog check". They seem to be completely Toyota 2ZZ-GE powered, but I never had to dig deeply enough to see if their ECUs are Toyota too.


I have a 2008 Elise SC (factory supercharger). And yes, it's the Toyota 2ZZ-GE engine (which was designed by Yamaha for them and is actually built by Yamaha) mated to the Toyota C64 gearbox. However, the ECU in mine, which started in 2006, is designated T4E (E=electronic throttle) and is a custom built unit for Lotus by EFI. It became standard in all 2ZZ-GE based cars (Elise (SC), Exige, 211 where only the programming is different. Lotus do use much of the Toyota OEM bits... like the exhaust manifold and intake parts, but do their own exhaust after the manifold. I'd also say the Elise has been damn-near bullet-proof.... 108K miles so far... no hiccups!

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 :wink:

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 19, 2021 2:50 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1948
Location: Sacramento, CA, USA
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)


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 26, 2021 4:22 pm 
Offline

Joined: Tue Sep 14, 2021 9:37 pm
Posts: 16
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.





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


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 26, 2021 4:37 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 28, 2021 7:43 am 
Offline

Joined: Tue Sep 14, 2021 9:37 pm
Posts: 16
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. 8)


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 30, 2021 8:45 am 
Offline

Joined: Tue Sep 14, 2021 9:37 pm
Posts: 16
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 30, 2021 8:51 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
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:

If you like what you can see, you can then buy a second hand copy. (The Internet Archive is handy because it has both the in-browser book view and a downloadable searchable PDF)

Edit: some books also found on Atari Archive (with author permission). For example


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 07, 2021 9:15 am 
Offline

Joined: Tue Sep 14, 2021 9:37 pm
Posts: 16
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"....
Attachment:
20211007_074917.jpg
20211007_074917.jpg [ 3.89 MiB | Viewed 1009 times ]


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"
Attachment:
20211007_074936.jpg
20211007_074936.jpg [ 2.23 MiB | Viewed 1009 times ]


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+
Attachment:
20211007_094858.jpg
20211007_094858.jpg [ 1.83 MiB | Viewed 1009 times ]



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


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 07, 2021 1:29 pm 
Offline

Joined: Tue Sep 03, 2002 12:58 pm
Posts: 325
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".

What's happening here is that the switch is either closed, and connecting the write on the right hand side to ground, or it's open, and letting it float. If that wire was connected to a pull-up resistor or a TTL input, it would get pulled up to Vcc. If you look at the voltage on that wire, you'll see either 0V (logical 0) or 5V (logical 1).
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...

The 'd' here represents 'digit', and the subscripts are just used to distinguish different ones. It's standard mathematical notation.
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 07, 2021 2:53 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
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
output structures.png [ 1.8 KiB | Viewed 993 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 16, 2021 12:55 pm 
Offline

Joined: Tue Sep 14, 2021 9:37 pm
Posts: 16
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"

Attachment:
20211016_132659.jpg
20211016_132659.jpg [ 3.94 MiB | Viewed 915 times ]



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.
Attachment:
20211016_132708.jpg
20211016_132708.jpg [ 2.85 MiB | Viewed 915 times ]


page 18
Attachment:
20211016_135029.jpg
20211016_135029.jpg [ 3.63 MiB | Viewed 915 times ]




page 19
Attachment:
20211016_135034.jpg
20211016_135034.jpg [ 4.05 MiB | Viewed 915 times ]



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?


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 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: