Print Page | Close Window

CeC technical information?

Printed From: TheAMCForum.com
Category: The Garage
Forum Name: AMC 6 Cylinder Engine Repair and Modifications
Forum Description: AMC-made I-6 engine mechanical, ignition and fuel from basic repair to high-perf modifications
URL: https://theamcforum.com/forum/forum_posts.asp?TID=99727
Printed Date: Mar/28/2024 at 6:41pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: CeC technical information?
Posted By: MIPS
Subject: CeC technical information?
Date Posted: Apr/27/2019 at 1:55pm
Has anyone ever spent time reverse engineering how the 6-cylinder CeC was built or any technical documents for the computer? They seem to be in the realm of "unserviceable if bad" due to how they are potted or at least, I'll have to destroy a computer to find out on my own.




Replies:
Posted By: Trader
Date Posted: Apr/28/2019 at 4:01pm
Have not reverse engineered but sometimes they can be "repaired" if it's moisture from cracked or separated epoxy.
Just clean the unit, wire brush the case and epoxy edges, flush with WD40, put in an oven for 2 to 3 hours at 160 degrees, and then pool in more epoxy.
Works some times, and if it does work the unit will last for years of service.


Posted By: MIPS
Date Posted: Apr/28/2019 at 8:32pm
Oh, mine works. I'm just more curious exactly how it was constructed and how a modern replacement could be provisioned. I've basically finished with the electrical and operational theory for all the sensors but now it's cracking the computer itself open to determine what type of microprocessor they used (and where it loads its ROM from), how the interface buffering works and if there are any other secrets hiding in the potting, which no matter what way you do it will be a destructive ordeal and will require a sacrificial unit.
People who are both skilled in automobile mechanics and electrical engineering isn't common.


Posted By: farna
Date Posted: Apr/29/2019 at 6:23am
Well, it's a GM system, so you might find some info on GM sites. Most people abandon it if it stops working, going back with a non-computer carb and distributor. Many forget that the distributor is part of the equation and use the original. That will work, but you really need a non-computer dizzy for best engine operation since it is calibrated differently.


-------------
Frank Swygert


Posted By: tomj
Date Posted: Apr/29/2019 at 10:19pm
i've made a lot of software-driven electronics for car control, including a completely software-driven cooling system (no belt-driven pump, no thermostat). i have no idea what CEC is beyond feedback carb, but i can tell you what the replacement *electronics* would be -- a modern microprocessor, a few MOSFETs, and a half dozen glue components. times have changed.

all functionality of any kind is done in code. LONG GONE is doing *function* in electronics. it's too brittle, costly, inflexible. purpose-written code is flashed into nearly generic hardware.  my car has three computers, networked, that do various things, and the hardware for each is exactly the same (except one has adds a big LCD, SDcard, controls, etc).


here's my cooling system. i do highly reliable electronics in an automobile environment. the devil's in the details.

auto electronics from the 80's or even 90's is so fantastically backwards and barbaric from what can be done today, there's no contest. it's like comparing a 2018 Corvette to a Model T.

code and electronics: https://sr-ix.com/Code/index.html" rel="nofollow - https://sr-ix.com/Code/index.html
the electronics itself: https://sr-ix.com/Code/Electronics/index.html" rel="nofollow - https://sr-ix.com/Code/Electronics/index.html
closed-loop cooling: https://sr-ix.com/Code/roadsterCooling/index.html" rel="nofollow - https://sr-ix.com/Code/roadsterCooling/index.html



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: tomj
Date Posted: Apr/29/2019 at 10:48pm
btw, the best place currently to find nifty controller and electronic stuff these days is Adafruit http://adafruit.com" rel="nofollow - http://adafruit.com . run by Lady Ada, aka Limor Fried, really good designs, good prices, lots of information, free software, drivers for everything. i love everything they do there.



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: Greyhounds_AMX
Date Posted: Apr/30/2019 at 12:05pm
Sometimes you can remove the potting gump by boiling the item in a pot of water. You still have to do alot of scraping though....

-------------
1968 AMX 390 w/T5


Posted By: MIPS
Date Posted: Apr/30/2019 at 9:03pm
You're pretty much doing exactly what I have in my head, just with a lot more complexity, which is fine as you've done quite a few more things beyond adapt a new computer to an existing system. Your whole site was well worth the read.

I could sit down and pretty easily build a shield for the CeC in an evening. It's like, six 12V digital inputs, four digital outputs, a two phase stepper motor output and an analog 1V O2 sensor input. Without fully understanding yet how quickly the CeC performs the feedback loop you could in theory use a microcontroller as small as the Arduino Pro Mini, which is about the size of a person's thumb, to replace the entire computer, assuming your code fit in the 32Kbyte flash memory.

I suspect that unless GM or AMC at the time was paying for custom semiconductors, the CeC uses something to the tune of an Intel MCS-48 or MCS-51 microcontroller.


Posted By: tomj
Date Posted: Apr/30/2019 at 10:32pm
i suspect you're right. GM used a slightly-custom 6811 in the "TBI" systems everyone (used to) adapt. dunno what quantity you'd have to order to get custom silicon. Motorola (used to) offer limited OEM quantity semi-custom in 10,000 to 100,000 unit quantities but that was the 1980's. today 100 MHz is no big deal!

so carbs lasted 90 years, then from around 1980 through say 2000 there were "feedback" carbs, electronic/mechanical/hybrid FI, throttle body FI, etc. by ~ 2000 it's port injection and now, direct injection. that stuff in the middle is mostly awful, like "microminiature" electron tubes like Nuvistors, 12V plate tubes for car radios, thickfilm, cordwood, all that awful electronic crap from the 50's and 60's before monolithic silicon. mostly feedback carbs and mechanical FI are horrid curiousities for restorers....

but personally i considered an electronically controlled computer -- for performance and fun-to-make purposes -- might be interesting and practical. the problem is that th base part itself is just to crappy to work with. some crap old smog 2bbl isn't a good basis for anything.

as far as i got was thinking about ... so what would be worth closed-loop control? to me, it would be main jet tuning and altitude compensation (which are really the same thing). analogous to the GM TBI map system, look for errors in the "map" (load vs rpm) lean/rich, and a table to tweak the mix by pulling the control rod up or down. but since this is a stepper with a cntrol rod, it wouldn't be a realtime adjustment like TBI map, but a slow (60 sec? 5 min?) scale that worries more about steady state cruise, and ensure rich enough during high load.

i've considered writing my own EFI -- because it's fun, not because i think i could do better than say MEgasquirt -- but it's a looooot of code for little benefit.

OH MAN! Megasquirt these days is handling X-tau now! that's the phenomenon of what happens when you squirt gas into a runner -- most of it goes down the hole with the air, but some of that wets the runner walls and valve, and that wetted-out fuel then evaporates with a time constant that depends on temperature and other factors.

a feedback carb compared to current Megasquirt (never mind what additional magic OEMs do now) is like a stone age club compared to an airplane.

for me, it's a carburetor, a nice "simple" (right!) mechanical thing, or full-tilt-boogie software, eg. Megasquirt. and this is probably my last carburetor.



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: amcfool1
Date Posted: Apr/30/2019 at 10:38pm
hi, just fyi, the early units may be GM sourced, but the 84+ units are FORD, and are still available at any auto parts place, about $200.  or so. biggest difference is the early ones control carb only, 84+ control carb AND timing. thanks, gz

-------------
george z


Posted By: MIPS
Date Posted: May/02/2019 at 6:57pm
You are not wrong there. From the mechanics manual alone there's indication of at least four revisions of the CeC before the Eagle went to TBI and a completely different arrangement.
First revision CeC (with DTC and CHECK ENGINE circuit)
Second Revision CeC (without DTC and CHECK ENGINE circuit, due to CPU constraints)
Third revision CeC (the "C4" system)
Fouth Revision CeC (Ford ECU?)

The ultimate goal is a drop-in replacement to the CeC that keeps the car compliant with regional emissions testing and otherwise identical performance while being made of modern components, however the added bias control of the fuel mix and ignition advance to work around the major shortfalls to the original CeC's locked-in emissions limitations. No fancy displays, no new wiring, no complicated instructions. Just plug it in, tweak a knob or two while tuning to your desired spec and you're set. System diagnostics otherwise remains the same.


Posted By: tomj
Date Posted: May/03/2019 at 1:24am
Originally posted by MIPS MIPS wrote:

The ultimate goal is a drop-in replacement to the CeC that keeps the car compliant with regional emissions testing and otherwise identical performance while being made of modern components, however the added bias control of the fuel mix and ignition advance to work around the major shortfalls to the original CeC's locked-in emissions limitations.


OH. i musta missed that.

in that case, since you have a good one now, don't take it apart! use it as the standard and measure what it *does*. watch, in real time, what a critical output does in response to an input. THAT is what is important. 

characterization. my guess is, it will be hard to get started, to figure out how to look at. off the top of my head, with an oscilloscope figure out what the inputs and outputs look like, electrically -- 12V PWM stepper? analog input? pulses? voltage levels and speeds and pulse widths, not meaning or intent. chances are this stuff will be relatively easy.

install a good wideband O2 sensor, kludge up an Arduino or two to sense (A to D, or code to parse PWM on time (you could probably do 1% by taking a 12V stepper output, passing it through an R C low pass network (integrator) then reading the resulting voltage via Arduino analog in. the delta will be important, not so much precision. *when* does it enrich the carb?

also you probably "know" spark control will be a simple 2D map; load (vacuum) and rpm. no real need to worry about the electronics there, just work out what the map is. that's easy! pull the vacuum hose (or fool CeC with a MightyVac), measure spark advance wiht a timing light at 500, 1000, 1500, ... 4000 rpm with no vacuum (that's "mechanical" advance) then at say 500 rpm, use the mightyvac to vary "load" and measure advance at 100, 90, 80, .... 0 KPa. then simply extrapolate in a spreadsheet. that's how i first populated my Megajolt box the first time, reading distributor with hose off etc.

carb will be slighly harder, but once you get into it probably doable.

get one od Afafruit's boards with built-in SDcard, and write a datalogger that outputs "columns" in CSV format. that's what my datalogger does and it's easy to do a rough job for your debugging.

document CeC's *functions*, it's guts are uninteresting.



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: amcfool1
Date Posted: May/03/2019 at 10:56pm
hi, if you need one to take apart, I have an old 82 that's all there, though the aluminum case is corroded some. Don't know if it still "works", though it should, as it hasn't been in use for the whole time I had the car (82 Eagle), since I did the MC2150/HEI thing. It just sat there for over 20 years. Yours free if you want, just give me a couple bucks for shipping, (from 24017). thanks, gz

-------------
george z


Posted By: MIPS
Date Posted: May/04/2019 at 11:51pm
Quote my guess is, it will be hard to get started, to figure out how to look at. off the top of my head, with an oscilloscope figure out what the inputs and outputs look like, electrically -- 12V PWM stepper? analog input? pulses? voltage levels and speeds and pulse widths, not meaning or intent. chances are this stuff will be relatively easy.


It's so simple. AMC in the process of making it cheap to impliment made all of the sensors extremely easy to monitor and troubleshoot.






With the exception of the O2 sensor which operates within an analog 0v-1v range the entire system is 12v digital and every sensor is either on at 12v or "off" and tied to ground. No pulses, no protocols and no weird switching states. AMC's own documentation is quite comprehensive in how each of the different open loop system states are created before the engine finally qualifies for closed-loop. The stepper motor is a simple two-phase circuit.

On top of the original tool that OTC sold for diagnosing the electronic feedback system I've been developing my own unit that allows for more status information to be displayed at once than the official tool allows. This is basically what I am using to verify AMC's own documentation and hardware before committing further.



Quote if you need one to take apart, I have an old 82 that's all there, though the aluminum case is corroded some. Don't know if it still "works", though it should, as it hasn't been in use for the whole time I had the car

That's fine. I'll send you a PM.

Ultimately depotting can start either by milling off the aluminum frame to release the epoxy block or skip that step entirely and boil the epoxy until it softens. (see https://www.youtube.com/watch?v=OiPe6f4Oh8E )
Ultimately if that fails then it goes under the CNC machine and the resin is milled off layer by layer until it's thin enough that the rigid epoxy can be again boiled and pried off.

Part of the goal if AMC/GM handled the CeC's ROM correctly is that if it (the ROM) can be extracted from the CeC, dumped and then the original timings and fuel tables extracted from the disassembled code they would not have to be redeveloped from scratch which is where my shortcomings in software development show but up to that point, hardware development is my specialty. ;)


Posted By: Greyhounds_AMX
Date Posted: May/05/2019 at 4:19pm
How about replacing it with a Speeduino? That would give alot of flexibility. Not sure about running the stepper though. 

I suppose with Speeduino it would be easier to switch to TBI.


-------------
1968 AMX 390 w/T5


Posted By: tomj
Date Posted: May/05/2019 at 9:55pm
WOW! haha yeah that's a lot of good information. good old TSMs! realistically you should assume that there are variations from the TSM, i mean what electronic product doesn't require tweaking in production etc? but its probably a good start.

you could code from what you;ve got there.

what exactly is the point of depotting? i seriously doubt you'll get very much insight into how it works.

nice test box! yeah, you gotta make something that lasts to persist at it. nice job.

O2 sensors are tricky sensors they're anything but linear. the so-called wideband sensors are a lot more proportional and can be made linear with processing. lambda sensors have a super-sharp slope around stoich and so most systems have an abstraction that essentally calculates the ratio of "too lean" to "too rich" time, with L/R flipping back and forth rapidly (GM TBI does this) then using that ratio as "A/F ratio". it's not really possible to control mixture so that the sensor outputs 0.45V. nothing in engine operation is that time-stable (Variable speed, variable load, etc).

that prose description and the pinouts/signals is great information!



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: MIPS
Date Posted: May/07/2019 at 8:50pm
Quote How about replacing it with a Speeduino? That would give alot of flexibility. Not sure about running the stepper though

I did look it as a potential replacement initially but the problem I found was that it's really reliant on several additional sensors an Eagle traditionally does not have and I wasn't interested in a replacement that also required multiple existing sensors be replaced or upgraded. It's also way more powerful than what an Eagle needs with a stock system. Remember that the more complicated the replacement is to install, the less people are interested in committing rather than just doing a full bypass. Building a replacement does involve starting from scratch but the digital input and output nature of the CeC coupled with relatively low sample rates makes it WAY easier to duplicate compared to even first generation TBI computers.

Quote what exactly is the point of depotting? i seriously doubt you'll get very much insight into how it works.

Depotting helps identify the microprocessor used, the location of the calibration ROM (which may prove helpful for when creating the same calibration data on the Arduino so you are not making wild guesses) and identify the location of any components that are known to fail with age (lytic can capacitors for ripple smoothing or AC decoupling) or input and output buffers that may be easily or accidentally blown. Computer replacements are costly if your region mandates it be working. If it's built from relatively common parts and we can map out the location of the various circuits then repairs may be as easy as someone ball milling out a chip and soldering in a replacement. Think like how some guilty folks in the 80's and 90's piggybacked new EPROMs into their VideoCipher satellite descramblers. It also verifies that there is no other "secret" connections going on. Note on the diagram above the CeC connector has four unmarked pins. What do they do? Where do they go?

O2 sensors for the 82 year Eagle are compatible with the NTK 23552. It's one of the few parts in the CeC that MUST be replaced as per its recommend 30000 to 50000 miles, otherwise the computer enters closed loop and cannot accurately regulate the mixture. This is also your only time in which you can justify having the emissions maintenance timer installed.

Really I'm just bored right now. I need something to keep my mind busy and this could keep me going for the rest of the year.


Posted By: MIPS
Date Posted: May/25/2019 at 8:09pm
Well this is a pleasant surprise.

So the silica-mixed resin used to pot the CeC turns into a sticky wet sand when boiled, however makes removing it a billion times easier. Beneath it all has so far uncovered an Intel 8049 8-bit Microcontroller which was introduced in 1976 and discontinued in the early 2000's




The datasheet for this microcontroller can be found here - https://www.ceibo.com/eng/datasheets/Intel-8048-8049-8050-plcc-dip.pdf

The 8049 specifically is the same microcontroller as the 8048, however with 2kb of onboard ROM and more ram, so the precious calibration data is hidden in the chip, but because many hundreds of thousands of products used the microcontroller well into the 21st century the procedure to dump it is well known. I'll keep working away at the resin and see if I can free the board from the body.

Edited: Pretty much done.





Even simpler than I expected. Microcontroller, what looks to be two drivers, a regulator and some other IC I've not really investigated yet. No drivers and no buffers, just a lot of diodes and resistors. I'm going to bed.


Posted By: tomj
Date Posted: May/26/2019 at 7:43pm
nice work! lol. i still sort-of remember the 8051 instruction set from ye olden dayes. ugh! lol. but that's good depotting!

of course the code is key to the realm...



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: FSJunkie
Date Posted: May/27/2019 at 1:50am
Really awesome to see this.

I wonder what the 1984 and up ECU looks like inside and what processor it uses.

MY father built Apple IIE computers in the 1980's when he lived in the San Francisco bay area and still has his PROM burner, so I figure he could help me out if my ECU ever takes a dump.

1984 and up ECU is definitely made by Ford, though as I understand it, no vehicles other than AMC ever used it.

I suspect the folks over at the Eagle's Den forum know more about this than most folks here. Eagle people are like their own community within the AMC community. It makes sense too, since Eagles are their own unique realm of AMC. They're just different enough from all other AMC cars to make them their own thing.

-------------
1955 Packard
1966 Marlin
1972 Wagoneer
1973 Ambassador
1977 Hornet
1982 Concord D/L
1984 Eagle Limited


Posted By: MIPS
Date Posted: May/27/2019 at 7:06pm
I might very well relocate this discussion over there now that it seems my posting issues there have been resolved, if nobody minds. I'm quite aware that this forum is centered a lot more around the earlier model cars so it might be odd to bump this from time to time with new updates. I'll keep you all informed.

Research I've found about the 8049 is that dumping it is fairly trivial using relatively modern and low cost EPROM burners/readers as Intel even describes the procedure in one of their technical databooks. On top of that for the REALLY savvy you can not only disassemble that original initialization data and modify the fuel tables but if you write it back to an EPROM the 8049 supports disabling the onboard ROM and loading from an external chip, so in all realms of possibility it now makes "chipping" the CeC possible, for at least the 82 model year.


Posted By: FSJunkie
Date Posted: May/27/2019 at 11:14pm
What did you boil the potting material in to soften it up?

Is the 8049 soldered to the board?



-------------
1955 Packard
1966 Marlin
1972 Wagoneer
1973 Ambassador
1977 Hornet
1982 Concord D/L
1984 Eagle Limited


Posted By: MIPS
Date Posted: May/27/2019 at 11:24pm
Boiled in regular tap water. The IC's have a "not in use" storage temperature that goes up to 150c, so boiling water won't damage them and the plastics in the connector require a lot more heat as well before they start to deform.
Initially nothing was in sockets, which makes sense as that adds points for poor contact. For testing and other purposes however I've since changed that.



Posted By: farna
Date Posted: May/28/2019 at 6:17am
Please do make updates! While you're working on this thing, it would be nice to work around the carb stepper motor. That's the one thing that will freeze up and isn't easily replaced. Sort of makes the CEC useless though, so I'm not sure if there would be a point if the carb can't be controlled. Controlling A/F ratio is the main function, though it obviously controls some of the other emissions stuff, like those three solenoids. I'd have to look at the wiring diagram again, but doesn't it do something with the distributor as well? I've always told people who were (and could legally) removing the emissions to get a non-emissions distributor as well. There might be some merit in making a CEC unit that works with a replacement non-stepper carb like a Weber 32/36 or 38, or Motorcraft 2100.

The Eagles is "it's own thing" because AMC got it classified as a truck, or rather a utility vehicle (which had the same looser emissions as a truck -- looser than a regular car/passenger vehicle). The first primarily passenger vehicle to be so classified by the US Government. Chrysler got the Dodge Magnum wagon classified the same way, though I think that was cheating. The Eagle at least had a truck-like 4x4 system (well, CJ like.. which IS a utility vahicle) and was unique, not just a high power station wagon.


-------------
Frank Swygert


Posted By: MIPS
Date Posted: May/28/2019 at 10:36pm
For the 82 model the computer doesn't actually have any control over the distributor directly. All it receives is the tach pulse (generated by the hall effect circuit in the distributor base) which is used all over the engine and can only send back the ability to slightly retard the spark using the DuraSpark II. The only other control one has over the distributor is the internal centrifugal advance and the vacuum advance, the latter operating from manifold and then ported vacuum as the engine warms up and the CTO switches over but regardless not maintained by the computer. I can also confirm that for stuff like the Air Injection system vehicles that sold without it seemingly will not suffer with it missing (in theory). Mine left the dealer without it at least.

The stepper motor is known as a two-phase stepper motor. It has a permanent magnet and two separate windings. From what I've seen the only other way it can fail besides an open winding is the rack the actuator moves in and out with will gum up. Resistance on this will cause "mis-steps" or simply seize the actuator completely.

The stepper motor is held together with three press pins cut flush with the metal body near the back. As I only have one stepper motor I'm not willing to drill the pins out and better investigate how the stepper motor goes together, however I can only assume that a spray of Electrosolve contact cleaner, a compressed air dry out and then getting some sewing machine oil down into to body through the gap around the actuator shaft (and then carefully pulling the shaft in and out by the rod AND NOT THE PHENOLIC DISC THEN PINS ARE ATTACHED WITH) should clean and relubricate the rack.

Finally I have completed mapping both sides of the circuit board. It seems for the most part the backside is where most of the work happens and on the topside the majority of the board is clad with copper for shielding. I have not yet gone further and compiled things such as a Bill of Materials or logical description of each circuit. That would take weeks.



Posted By: FSJunkie
Date Posted: May/29/2019 at 2:29am
The 1984 and up system is different, mainly in how it controls the ignition timing.

With the 1984 and up system, the signal pulses from the distributor pickup coil must pass through the ECU before they reach the Duraspark module to trigger a spark. The ECU has full control of the ignition timing.

The ECU continuously monitors the knock sensor and the pulses from the ignition coil indicating a spark plug firing for a power stroke on a cylinder. If the knock sensor detects knock, the ECU waits five pulses then delays the timing of the sixth because that would be the pulse to fire the spark plug of the cylinder that knocked previously. If the knock sensor does not detect knock, the ECU waits five pulses then advances the timing of the sixth. In this way, the ECU continuously maintains the ignition timing for that cylinder right on the edge of knock at all times and under all operating conditions. The ECU performs this function for each cylinder individually so each cylinder runs at it's own unique optimum ignition timing. It has no idea which cylinder is number one. All it knows is an ignition pulse is occurring and whether or not knock is happening as it occurs. Based on that, it determines whether to advance or retard the sixth pulse after that, being the pulse for the original cylinder.

It's genius. It provides more optimum ignition timing that possible with a conventional distributor which runs all cylinders at the same ignition timing, regardless of individual cylinder operating differences (like fuel mixture). It can maintain the optimum ignition timing regardless of ambient operating conditions, unlike a conventional distributor which must be set to a "compromise" setting to run acceptably in all weather and conditions. This system gives better power and fuel economy than possible with a conventional distributor.

And it works. I've watched the ignition primary pattern on an oscilloscope as I tap on the intake manifold near the knock sensor with a small hammer. The tapping will make individual firing lines retard (whichever cylinder was firing during the tapping), but they advance back as soon as I stop tapping and "balance out" to the others.

I drove my Eagle to Phoenix a couple weeks ago with the base ignition timing still set to the more advanced "high altitude" setting. As I pulled up onto the freeway, I heard the engine knock a little. Just for a second. Then I heard the nock slowly fade away as the ECU retarded the timing for the cylinder(s) that were knocking. It did not knock the entire rest of the day. The ECU learned.

It's incredible technology. And people just remove it and throw it away as "emission control BS junk." They just don't understand, or want to understand.

-------------
1955 Packard
1966 Marlin
1972 Wagoneer
1973 Ambassador
1977 Hornet
1982 Concord D/L
1984 Eagle Limited


Posted By: amcfool1
Date Posted: May/29/2019 at 5:57am
hey, fsjunkie, excellent explanation, thank you. When I rebuilt my 84 I decided to challenge myself and go all stock, which I did, and the car is now running well. I did buy a new (remanufactured ) computer, and as many of the sensors as I could. Took some doing, but of the eight sensors, 6 are still available new, mostly thanks to CA and their pollution laws. Only the knock sensor, and I believe the air temp sensor in the air cleaner are no longer available (afaik) The only system I did not rebuild was the air injection system, as mine was totally beyond salvage, so I went with a modern freeflow cat that does not require it.
thanks, gz


-------------
george z


Posted By: amcfool1
Date Posted: May/29/2019 at 6:08am
btw, people get rid of this stuff because it is very hard (for the average shade tree mechanic) to diagnose and repair, and one small vac leak can cause all sorts of problems. Just finding parts can be difficult, took me the better part of a year. So don't be too hard on 'em. Better to save an Eagle without the CeC, than just junk the car!
What I would like, from the electronic geniuses among us :) , is a diagnostic tool, not a better computer.
thanks again, gz
(the original AMC code reader is primitive, absolutely unobtainable)


-------------
george z


Posted By: Greyhounds_AMX
Date Posted: May/30/2019 at 7:02am
The computer appears to be the Ford "MCU", which is their first feedback computer. It was out just before they started using the EEC, around 1981. 

Here's a 1981 F150 pic:



And if that's the case you may be interested in this for $2 on ebay right now:





-------------
1968 AMX 390 w/T5


Posted By: tomj
Date Posted: May/30/2019 at 9:32pm
nice work in here!

i'd love to hear what the code does, specifically whart the approach is to maintaining AFR. is there a load/RPM map? (does CEC have a manifold pressure sensor?)

the old lambda O2 sensor only generates lean/rich information, so GM put a closed loop around it all and generated correction by integrating the "error". the point is, the GM system was too slow to correct A/F ratio in real time, in that it first sets fuel (PWM in the GM TBI system, jet rod position with CEC) from history, then adjusted the fuel to correct any error.

the GM TBI system used a custom 6810 or 6801 processor, more computational poop than the lowly 8049. also changing PWM a dozen times/sec is "real time" enough; a stepper motor on a rod in a jet (i think the BBD uses) is slooow...

the problem is interesting to me. i'd love to see the code if you extract it.



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: 73Gremlin401
Date Posted: May/31/2019 at 12:20am
Originally posted by amcfool1 amcfool1 wrote:

hey, fsjunkie, excellent explanation, thank you. When I rebuilt my 84 I decided to challenge myself and go all stock, which I did, and the car is now running well. I did buy a new (remanufactured ) computer, and as many of the sensors as I could. Took some doing, but of the eight sensors, 6 are still available new, mostly thanks to CA and their pollution laws. Only the knock sensor, and I believe the air temp sensor in the air cleaner are no longer available (afaik) The only system I did not rebuild was the air injection system, as mine was totally beyond salvage, so I went with a modern freeflow cat that does not require it.
thanks, gz


I'm very much like you - my 80 Concord has everything still in place, but when I got the car, nearly every vacuum tube was either disconnected, leaking, or connected to the wrong things - and the motor barely ran.  It's taken some time (the better part of 2 years, fiddling with it on and off) but I've finally got all the vacuum tubes hooked up correctly, sealed, the air pump and 02 sensor replaced (the only failed parts) and the car runs astonishingly well. It was a fun project that really didn't cost much other than time to sort out, and since I live in an emissions-tested area, it was essential to get right.


-------------
73 Gremlin 401/5-spd.
77 Matador Wagon 360/727.
81 Jeep J10 LWB 360/4-spd
83 Concord DL 4-dr 258/auto



Posted By: tomj
Date Posted: May/31/2019 at 9:18pm
i had similar experience with a 1975 California V8 Gremlin. buckets of hoses. expensive EGR with CA-only pintle. once done though ran just great.



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: MIPS
Date Posted: May/31/2019 at 11:38pm
It was mentioned before that these computers were built by ford for AMC, so it's not too much of a surprise to see that unit living in an F150, however if Wikipedia is to be correct, they are not compatible, at least, programming wise. I'll work on getting the chip dumped soon but the adapter is a little expensive and likely take at least a month to show up. I have to find my disassember tool as well because the dumped binary is unreadable in a compiled state. Once it's disassembled things start making sense but any comments or notes in the source code will of been lost.

Quote i'd love to hear what the code does, specifically whart the approach is to maintaining AFR. is there a load/RPM map? (does CEC have a manifold pressure sensor?)

The CeC only knows of three vacuum states, no vacuum, 4"hg (ported) and 10"hg (adaptive). Anything outside of that or in between it doesn't know of.


Posted By: FSJunkie
Date Posted: Jun/01/2019 at 3:27am
There is a 4" Hg switch hooked to ported vacuum and a 10" Hg switch hooked to manifold vacuum. With those two switches and a mechanical switch on the throttle, the ECU can determine:

Closed throttle idle.
Closed throttle deceleration.
Light throttle.
Heavy throttle.
Full throttle.

Closed throttle and full throttle are open loop, so the ECU just drives the metering rods to a predetermined position regardless of AFR. The only conditions it uses closed loop are light throttle and heavy throttle. It likely maintains 14.7 AFR all the time during a light throttle indication and switches to something richer like 12.5 AFR during a heavy throttle indication. I don't think there is really a map or RPM consideration to it. It just picks an engine load condition and prescribes a fuel mixture, like a power valve in a carburetor.

That's my best guess based on reading the manuals and working on them.

-------------
1955 Packard
1966 Marlin
1972 Wagoneer
1973 Ambassador
1977 Hornet
1982 Concord D/L
1984 Eagle Limited


Posted By: billd
Date Posted: Jun/01/2019 at 9:37am
A friend of mine who hangs out with Eagle folks, he's from a state east of me I believe and an Eagle restoration nut, actually RESTORED an eagle to all its glory with all emissions stuff, all vacuum hoses and lines and it was SOOO COOL to see one restored to that degree and the stuff not ripped out and bypassed. 

OK, my 82 SX4 is 4.0 equipped but I DID save most of the stuff I stripped from it-  including the "computer" and more. It's sitting around. Rather than toss it i'd like to see it go to someone who can use it. Mine was a Nevada car sold to a CA driver so it came from CA but was originally if I recall a high altitude car from Nevada (not to be confused with Nevada, Iowa)
I should have all of the stuff, and I even have a NOS diode board (can't recall the official AMC name) and a NOS set of the vacuum devices that sat in a bracket near the firewall. 
So anyone wanting to take an Eagle to the same level Matt did with his yellow SX4 (I think it was yellow...?) I have some NOS stuff and the stuff from my own car like the computer shown in the pictures here in this thread.

-------------


http://theamcpages.com" rel="nofollow - http://theamcpages.com

http://antique-engines.com" rel="nofollow - http://antique-engines.com


Posted By: MIPS
Date Posted: Jun/01/2019 at 11:45am
I could very well poke at one of those as well if people so wished but that too would require modules I don't have.

The stepper motor is peculiar as the CeC limits its operation to something like 16 steps from full rich to full lean even though the motor itself can more accurately step twice as many steps before hitting the end stops. Likewise the motor only takes about 1/4 second to do the full travel, so fine adjustments (within 3-6 steps either direction) while driving are likely happening extremely quickly but it's hard to really get on camera, so here's just full pin travel on a computer with a bad O2 sensor.

https://youtu.be/b_BOvlLOrP0" rel="nofollow - https://youtu.be/b_BOvlLOrP0

Here's another but with a surge condition so you can see the engine constantly trying to lean out and then correct.

https://youtu.be/DsW_zbebotA" rel="nofollow - https://youtu.be/DsW_zbebotA


Posted By: billd
Date Posted: Jun/01/2019 at 10:19pm
Very interesting research here....... and good info for others to use as reference.

-------------


http://theamcpages.com" rel="nofollow - http://theamcpages.com

http://antique-engines.com" rel="nofollow - http://antique-engines.com


Posted By: tomj
Date Posted: Jun/02/2019 at 12:56am
thanks FSjunkie for that. with only 16 total? steps there's not a lot of resolution. so it isn't the fully adjustable carb i imagined it might be; i probably shouldn't be surprised but i still disappointed anyway.

so it's probably more like a set of pre-calculated carb settings for a limited number of operating conditions. not hard to imagine you have this complex set of hoses and valves and engine, and a couple of spots are way out of spec, how to pull them into compliance? in 2019 all of this stuff has long been 'generalized' into a computation-based solution; modern EFI doesn't special-case "acelleration" in so far as the hardware is concerned; it's complex calcs, but the same 'simple' injector. the complexity didn't go away, it just moved to a much more manageable technology -- software.

after spending zero effort research feedback carbs (lol), i imagined them as having something like a tapered needle in a jet that had a fairly wide range of adjustment and some sort of closed-loop feedback system. like GM TBI. oh well! hahaha





-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: tomj
Date Posted: Jun/02/2019 at 12:57am
this is a really interesting view into the Malaise Era engineering issues. thanks everyone!


-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: Greyhounds_AMX
Date Posted: Jun/02/2019 at 7:27am

Unfortunately I don't believe there's going to be anything like a fuel table for you to find in the code.

As tomj pointed out, up until mid-2000's all oxygen sensors were "Lambda" sensors, which could only accurately tell if a mixture was too rich or too lean. There's no scaled output of how rich or how lean, it pretty much outputs one voltage below stoich and another voltage above stoich. Wide band O2 sensors didn't see widespread use in production vehicles for another 30 years or so, and you need a wideband in order to measure the exact A/F ratio if you are going to use that as a target for performance or mileage or whatever. So the Lambda sensor can only be used to operate an engine at an A/F ratio of 14.7:1, and if it measures rich the CeC leans out the carb until the Lambda sensor measures too lean, then richens until it's too rich, etc, endlessly. That concept continued for decades - my 1995 ZJ worked the same way. The only time it wasn't 14.7:1 was during open loop operation on cold start or during WOT. 

It's still fun hacking on it and learning, but it you want to control A/F ratio via a table of rpm and load you'll need to add a wideband O2 sensor and use something like Speeduino maybe. If you want to make a drop in replacement CeC maybe there's a market for that, but you'd probably have to do it on an "exchange" basis and de-pot each one in order to re-use the connector and case. Someone posted that new ones are about $200, which would probably be hard to compete with as it looks like a lot of work to de-pot the board enough to get at the connector.



-------------
1968 AMX 390 w/T5


Posted By: MIPS
Date Posted: Jun/02/2019 at 10:35pm
I did not actually see the previous mention for the cost of the connector, however now that I know it's....unpleasant. There isn't really much of a work around then except for as you mentioned harvesting existing ones off other CeC's working or not. I think it might just come down to begging the off-roaders to sell their modules if they've removed their system.

My bad if my thought on the fuel tables was wrong. First time really digging into this so I'm trying to still weed out modern car talk from computers and ECU's because MAN every time I expect this to be something complicated it's just something even simpler.
Hmm, perhaps there's a way to just initialize the microcontroller with a different idea of what the "ideal" air fuel ratio is? This may require a little bit of experimenting.


Posted By: Greyhounds_AMX
Date Posted: Jun/03/2019 at 6:53am
I'm sorry - I was meaning the cost of a replacement CeC was around $200. I haven't been able to find that connector anywhere.

The only way it could control to a different setpoint target than the 14.7:1 would be if it knew the rate of change of the A/F ratio. But the Lambda sensor doesn't provide that unfortunately, so there's no way to do it.

A wideband O2 sensor with electronics package to drive it can be had for about $200 nowadays, which is pretty amazing. But then you'd still need a processor to do the PID loop to drive the carb stepper motor.


-------------
1968 AMX 390 w/T5


Posted By: tomj
Date Posted: Jun/03/2019 at 10:49pm
A/F ratio isn't measured with a lambda sensor; it's derived, mathematically, from the average over time of lean/rich. that's how GM's TBI does it.

with the engine running the system makes a guess (literally a history-based guess) as to what injector PWM value produces correct mix. of course the lambda sensor does produce that; the code does, indirectly. it's easiest to imagine averaging (integrating) the TIME SPENT LEAN vs the TIME SPENT RICH, and if the rtio or those two values is 0.5, then it's stoich. if its richer than that the PWM on time is reduced; if too lean PWM on time is increased.

this works because the engine is a big block of metal and moves slowly relative to the sensor and software. the code dances around the slow metal.

if you're not a programmer, that's a good intro into how good programmers think up solutions to problems using cheap, crappy sensors.

you could "measure" the temperature of a room by turning the wall thermostat back and forth until the furnace went on, then off, etc, frequently. if its always-on the actual temperature is lower than the thermostat, always off, it's hotter. if it switches back and forth it's "close".

accuracy is relatively limited, and the derived A/FR lags behind in time aa few hundred milliseconds. certainly "good enough" for the 80's.



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: Greyhounds_AMX
Date Posted: Jun/04/2019 at 6:57am
In operation, A/F ratio can change almost instantaneously. The time weighting you see used in the control logic is there to add hysteresis around the setpoint so the stepper motor or whatever controls the fuel flow rate doesn't wear out quickly by cycling up and down continuously. Since the Lambda sensor only reports rich or lean and not how rich or how lean, the only way to add hysteresis is based on time.

Engine temperature (or almost any temperature control loop) on the other hand would respond slowly due to the mass of the engine, coolant, etc. 


-------------
1968 AMX 390 w/T5


Posted By: farna
Date Posted: Jun/04/2019 at 11:53am
So in reality you guys are on the same page. Yes, A/F mixture can change rapidly, but with a feedback carb (or cheap TBI/EFI) you don't want changes too often or quick due to parts wear and time to function. So "close enough" is the rule...

Modern port injection can respond faster, but I bet there's still some lag built into the systems.


-------------
Frank Swygert


Posted By: Greyhounds_AMX
Date Posted: Jun/04/2019 at 12:24pm
The point to take home is that with a narrowband Lambda sensor like what the Eagle has we're stuck with closed loop operation that's fixed at approximately 14.7:1 A/F ratio.




-------------
1968 AMX 390 w/T5


Posted By: tomj
Date Posted: Jun/04/2019 at 11:12pm
i wonder what the goals of CEC were. greyhound is correct, the poor stepper would last a month tgrying to update (and would be too slow).

maybe altitude and temperature (warmup) compensation? that stuff is slow moving.

the carb has the other usual junk doesn't it? accellerator pump and all that?



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: 73Gremlin401
Date Posted: Jun/05/2019 at 12:44am
Originally posted by tomj tomj wrote:

i wonder what the goals of CEC were. greyhound is correct, the poor stepper would last a month tgrying to update (and would be too slow).

maybe altitude and temperature (warmup) compensation? that stuff is slow moving.

the carb has the other usual junk doesn't it? accelerator pump and all that?



SFAIK, the stepper-motor doesn't do much other than help to control mixture.  the BBD carb itself was augmented differently most every year in response to the prevailing emissions requirements, and the sheer number of BBD variations within a year model was staggering at times. My current driver, a 1980 Concord, has 2 key things hanging off the carb, a throttle 'kicker' that cracks open the throttle at idle when the car is in-gear or with the AC on, and choke is fully off; and a very simple throttle position switch which is looking for an open/closed condition only.  I'm guessing that goes to the computer to help it agree with what the 02 sensor is sending it.  in 1980 there were still high-altitude/49-state/California carb variations, as well as versions for automatic and manual transmission, as well as several versions exclusively for the Eagles, which were classed differently - so at least 8 versions in that year alone.


-------------
73 Gremlin 401/5-spd.
77 Matador Wagon 360/727.
81 Jeep J10 LWB 360/4-spd
83 Concord DL 4-dr 258/auto



Posted By: MIPS
Date Posted: Jun/06/2019 at 10:47pm
Here's the official stance on how the stepper motor works in the 2BBD. Keep in mind that stepper motors are typically rated for tens of thousands of hours before failure when they are sealed like this. More than likely poor performance of the stepper motor itself can be blamed on lubrication that has gummed up with age as opposed to bearing wear or an open winding.




Quote My current driver, a 1980 Concord, has 2 key things hanging off the carb, a throttle 'kicker' that cracks open the throttle at idle when the car is in-gear or with the AC on, and choke is fully off; and a very simple throttle position switch which is looking for an open/closed condition only. I'm guessing that goes to the computer to help it agree with what the 02 sensor is sending it

The first item is the Idle Speed Control Solenoid, or "Sol-Vac". It's a whole circuit that simply bumps the idle up for certain load conditions like you specified, plus can be computer operated when necessary but is not related to O2 sensor operation.
The other item is the Wide-Open Throttle switch. Its only purpose is to tell the computer when the throttle plate is within 15 degrees of being completely open. There's more on this below.
Quote
maybe altitude and temperature (warmup) compensation? that stuff is slow moving.

Altitide control on the 82 CeC is controlled by a jumper that is either grounded to indicate you are operating above 4000 feet or tied back and not connected to anything, indicating you are working anywhere below 4000 feet. Remember that this is all-digital so the computer can only receive a YES or NO when it is looking at any sensor (excluding the O2 sensor). The computer does not monitor the status of this signal during operation, so it initializes accordingly when it is powered on.

Likewise the CeC has multiple open-loop modes it will go into depending on what the sensors are indicating when the computer is powered on. This will also affect where the stepper motor sits and remains while in open-loop.



Once all the sensors satisfy their requirements for closed-loop the computer runs a timer to verify everything remains above spec, then enters closed-loop and from then on it is reliant on the O2 sensor and begins full-time stepper motor operation.



I think I mentioned it before in the thread that a working O2 sensor is ESSENTIAL, otherwise you enter closed-loop and the computer will immediately stick you in a max lean or max rich condition which makes the engine run like crap.
A very VERY "you must read this" place to read up on all the related sensors above is http://gleebledorf.com/" rel="nofollow - http://gleebledorf.com/ It's more oriented for Jeep configurations but Eagle and similar AMC models use otherwise the same components.


Posted By: farna
Date Posted: Jun/07/2019 at 7:35am
"...otherwise you enter closed-loop and the computer will immediately stick you in a max lean or max rich condition which makes the engine run like crap."

The Nutter Bypass (bypasses the emissions controls) sets the stepper motor in the mid position. Something about when the system is first initialized it starts in the mid position (switch on, engine not running), then adjust rich or lean from there? So you have to have everything connected before removing the CEC system so the carb stays in the mid position. It still won't run as well as a functioning CEC system, but doesn't run like crap because the metering pins are full rich or full lean -- so it runs "better" with the original carb. If you're going to remove the emissions system you need a non-emissions carb, so may as well upgrade to a Weber or Motorcraft 2100. A non-emissions dizzy usually helps as they are curved differently, especially the later models that had some computer timing control .


-------------
Frank Swygert


Posted By: 73Gremlin401
Date Posted: Jun/07/2019 at 11:27am
Originally posted by MIPS MIPS wrote:


I think I mentioned it before in the thread that a working O2 sensor is ESSENTIAL, otherwise you enter closed-loop and the computer will immediately stick you in a max lean or max rich condition which makes the engine run like crap.

THIS!   So very very true.  the 02 sensor is everything.  Every time I talk with someone about how much they hate how their feedback BBD motor runs, and how they are going to tear everything off, I always ask them if they've replaced the 02 sensor.  And invariably the answer is either no, or that they insisted their motor doesn't have one, because it has a carb.  And it's just about the cheapest 02 sensor on the market - I think I paid around $5.00 for mine on Rock Auto.  yes, it's a pain in the rump to get to, but the instant I changed mine out - I immediately had a better running motor.  But trying to convince the 'I'm gonna tear everything off' guys this is like talking to a brick wall.


-------------
73 Gremlin 401/5-spd.
77 Matador Wagon 360/727.
81 Jeep J10 LWB 360/4-spd
83 Concord DL 4-dr 258/auto



Posted By: tomj
Date Posted: Jun/09/2019 at 10:12pm
73gremlin401 -- ok that makes a lot more sense -- a multi-step rod-in-jet. well within what a stepper can reasonably do.

that's a lot of interim complexity. developing EFI was difficult and slow. it's easy now that a zillion hours have gone into the software.



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: MIPS
Date Posted: Jun/09/2019 at 11:05pm
Just a heads up, I went back and re-read the documentation and I am wrong about how many steps the stepper motor can do by a HUGE amount.

Originally posted by AMC Mechanics Manual for 1982, page 1J-61 AMC Mechanics Manual for 1982, page 1J-61 wrote:

The motor has a Range of 100 steps, but the normal operating area is mid-range (e.g., 40 to 60 steps).


I said something like 16? That's way off. Take the number above, not the number I said back on page 4.


Posted By: FSJunkie
Date Posted: Jun/10/2019 at 4:09am
Originally posted by 73Gremlin401 73Gremlin401 wrote:

But trying to convince the 'I'm gonna tear everything off' guys this is like talking to a brick wall.


No, it's worse. I've talked to brick walls before, and at least when talking to a brick wall all you hear the sound of your own voice echoing back at you and nothing more. Walls don't say nasty things back at you when you tell them something they don't want to hear.

The key to happiness in owning 1970's and 1980's cars is not giving one single flying fack what people think, and caring even less about changing what they think.

That's just owning AMC's in general. You have to not care what Ford, Chevrolet, and Dodge people think and ignore the horrible and totally false things they sometimes say to you.

-------------
1955 Packard
1966 Marlin
1972 Wagoneer
1973 Ambassador
1977 Hornet
1982 Concord D/L
1984 Eagle Limited


Posted By: farna
Date Posted: Jun/10/2019 at 5:28am
The stepper needles in a BBD are tapered, not stepped like Carter carb jet rods. Makes them more adjustable.



-------------
Frank Swygert


Posted By: MIPS
Date Posted: Sep/17/2019 at 11:19pm
I've been pretty busy the entire summer however I was able to get the complete "Super D" ECU system that shipped in Eagles from 1983 onwards. The one pictured below came out of an '87. The last year an Eagle shipped with the AMC name.



The same harness, but this time with 99% of the parts identified.



The ECU itself is still a Ford product but now with a new enclosure, connectors and board layout. This is so new I do not have any diagrams or documentation for it.




While it is a new PCB inside is neither potted or too far different from the previously pictured CeC. This is likely because so much of the harness and so many of the sensors have not really changed since the CeC. There are a lot of similar components. There is also a bit more going on but presumably it is additional control for the purce solenoid and knock sensor. I have however noticed that the part numbers on all the IC's do not cross-reference to their manufacturers. It is likely Ford had the various chip manufacturers print one of Ford's own part numbers on them. That way only ford or AMC could identify components as they had the cross-reference. For the rest of us we were out of luck.




Posted By: MIPS
Date Posted: Oct/08/2019 at 12:23am
I have managed to secure one of AMC's ET-501 diagnostic kits for the CeC and related wiring. Cost me about $250 shipped.



I've made a writeup on the kit http://www.vcfed.org/forum/entry.php?775-How-did-you-run-an-Emissions-Diagnostic-in-the-80-s" rel="nofollow - here , however I see other much older threads here from people asking for extra info on the tester and notably the manual so (unless Dropbox kills the links) you can download a PDF of the manual that I scanned and assembled https://www.dropbox.com/s/s693xy4v0789ges/AMC%20ET-501%20Instruction%20Manual.pdf?dl=1" rel="nofollow - here and if you are missing the test chips and have the ability to burn new EPROMs you can download their images https://www.dropbox.com/s/jl6155riempathz/AMC%20ET-501%20ROM%20Images.zip?dl=1" rel="nofollow - here .


Posted By: pacerman
Date Posted: Oct/08/2019 at 10:57am
That is neat.  If I can stay away from owning another post-1979 or so AMC I will never need it but thank you for the effort.  Joe

-------------
Happiness is making something out of nothing.


Posted By: tomj
Date Posted: Oct/08/2019 at 11:57am
Originally posted by MIPS MIPS wrote:

...I have however noticed that the part numbers on all the IC's do not cross-reference to their manufacturers. It is likely Ford had the various chip manufacturers print one of Ford's own part numbers on them. That way only ford or AMC could identify components as they had the cross-reference. For the rest of us we were out of luck.


the reason for that isn't (primarily) secrecy. it's a side effect of how the semi industry works.

so moto, or national, or ti, or etc, makes a new chip (processor, op amp, whatever) that (Ford) wants to use. Ford's CeC product design life is say 5 years, then then need spares, and development, etc so they will want tthat processor to be available for (guessing) 7 years. National has it's own dev schedule, not Fords.

so National tells Ford if you commit to buying 1,000,000 chips over hte next 7 years, we'll freeze a copy of this design for you. at that point it gets a proprietary part number, and National's existing design is "frozen" over in the proprietary drawings etc.

at least at first, thre Ford part is identical to the National part, and National makes extra money for simply silkscreening a new number on top. but if in say 3 years National wants to "improve" the chip -- which would force Ford to redesign, or more likely, induce possible side effects that could ruin Ford -- National now has to make two chips; the old one with the Ford number, then their new one. that costs more (two production lines) hence the extra charge up front for the proprietary part.


it should be fairly easy to ID the proprietary chip. in 1980 there just weren't many small processors. the two wavy lines (logo) on the big 40 pin cookie i think is National Semiconductor. the hard part will be finding a 1980 Natl Semi catalog! it might be an 8048/8051 second source, or one of their wacky homegrown jobs. you only have to get 90% close. the diffs will be relatively small, like different pins, or a couple of instructions, like GM got out of Motorola for their TBI system; it was a 6811 with a couple of oddball I/O instructions added or changed. those fall out of context in code disassembly.

none of that era's parts had encryption certainly, and lots of them have readable PROM. i assume from the pic of the green board there's no separate PROM/EPROM, so it's a chip masked with code or burned at the factory.  assuming you wanna look at the code...


it's functioning is not so complex that you couldn't work out what its doing with a scope, in a running engine... or build a bench-top simulator.  for that i'd write code in something dimwittedly deterministic like a 120 MHz "Arduino", my current favorite the Adafruit M4 Grand Central, 54 I/O pins! faster than a 1990's desktop! $30! lol. most of the work there would be translating the 3.3V logic ins and outs to 12V. DIY or buy.

i bet you could guess at most of the inputs and sequences.


-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: tomj
Date Posted: Oct/08/2019 at 12:04pm
 nice investigative work, BTW! ignore the haters, there's a lot of interesting lore in there. and yeah i had a 1975 California V8 Gremlin, with the buckets'o'smog under the hood, and i got it all to work 100% super sweet with all that junk intact. just RTFM and diagnosis and replace all the hoses. the problem with old-fashioned smog stuff is that it's maintenance-intensive; hoses go bad, and no self-diagnostics to display "FILTER CLOG" on a display, it just runs badly!

haters hate vacuum wipers for the same reason. sure there's plenty of reason makers swirtched to electric; but it's not like AMC (or anyone) shipped cars for 50 years with non-working wiper systems. duh.




-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: MIPS
Date Posted: Oct/10/2019 at 8:58pm
@tomj you are pretty much correct. After spending more time getting used to AMC's part numbering scheme it's becoming apparent that for example a chip that is stamped D9AF-DA and has a suspicious wiring arrangement of a driver can very well be a ULN2074 quad darlington switch, but with a custom silkscreening because a vendor will give you that option once your order quantity goes into the hundreds of thousands or millions of pieces.

Indeed you are correct in that commodity microcontrollers of this era lack virtually any security, mainly due to the unlikely chance at the time a person had both the equipment and the knowledge. 8048's are pretty easy to dump, but the adapters for programmers like my Willem are not cheap, even today.
With that in mind, given just how similar the 82 model CeC design is compared to the pictured 87 model MCU, I am going to make a safe assumption that it uses the same microcontroller with an internal mask rom.

Also just in case anyone is wondering if me depotting the first computer damaged it, the tester says it's still fine. Don't know how it concludes that but that's peachy in my books.



Posted By: tomj
Date Posted: Oct/10/2019 at 9:06pm
that's all pretty freakin amazing. that gear is beautiful. thanks for the great work!

-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: pacerman
Date Posted: Oct/10/2019 at 9:42pm
Just an observation but would not the D9 portion of the that part be correct for a 1979 Ford.  Was Ford using the same logic software as AMC or more probably, was AMC using Ford hardware?  

OK nevermind.  I re-read the thread.  Of course the were.
Joe


-------------
Happiness is making something out of nothing.


Posted By: FSJunkie
Date Posted: Oct/13/2019 at 4:46am
Good to see a 1984 and up "Super D" getting dissected.

All this is leading to the eventual goal of dumping the code off that 8049, altering the code for a custom engine tune, and re-writing the altered code to an external PROM.

That would be really, really cool and allow Eagle owners to get their engines really tuned well. Modern gasoline does not run like 1980's gasoline, so some of the open loop fuel mixtures need adjusting.

I am comforted to see the original code was written in MROM rather than PROM, so it shouldn't deteriorate with age as much as PROM.

-------------
1955 Packard
1966 Marlin
1972 Wagoneer
1973 Ambassador
1977 Hornet
1982 Concord D/L
1984 Eagle Limited


Posted By: tomj
Date Posted: Nov/26/2019 at 4:37pm
currently on abebooks.com is this:

Motor 1983-84 American Motors, Chrysler and Ford Vacuum and Wiring Diagram Manual/Professional Service Trade Edition (Motor Chrysler/Eagle/Jeep Ford . Manual Professional Service Trade Edition)


$4.35!!! it's Motors, not AMC, but a trade professional book, not hobbiest. If no one else buys it i might even though i have zero interest in 80's cars.

https://www.abebooks.com/servlet/BookDetailsPL?bi=22667016384&cm_sp=det-_-bsk-_-bdp" rel="nofollow - https://www.abebooks.com/servlet/BookDetailsPL?bi=22667016384&cm_sp=det-_-bsk-_-bdp



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: MIPS
Date Posted: Dec/15/2019 at 8:24pm
So now that I have spent a considerable amount of time over the summer reverse engineering the 82 and 83-87 computers, understanding their theory of open and closed loop operation and constructing my own testing device to compare data the official tool does not show, while I am getting really good at identifying problems it's becoming increasingly clear that the initial goal of a completely new computer to counteract the 80's emissions mandate is probably outside of the scope of my abilities. There are a number of fixed functions that cannot be easily changed without modifying the electronics, thus it no longer becomes a drop-in fix. At the same time there are components the replica MCU's need (such as the harness connector) which are prohibitively expensive (one harness connector for an 82 model year CeC is $230CAD each if ordered in quantities of 10) and not entirely feasable to extract from existing MCU's. At the same time this Eagle has been destroying me for money and I've still been unable to get my hands on an adapter to dump the MCU's code. It's still possible and I really want to do it but I cannot set a timeline anymore.
I'm sorry you guys. I'm dropping the ball on this one. We may very well be stuck with the CeC for now unless someone else wants to take a stab at it.

In other news, the manual for the ET-501 tool is now available on the Internet Archive where I can assure you it will be available for far longer than my dropbox.

https://archive.org/details/amcet501instructionmanual" rel="nofollow - https://archive.org/details/amcet501instructionmanual


Posted By: farna
Date Posted: Dec/16/2019 at 6:18am
Great effort though! Systems like this get obsolete and costly (if not impossible) to repair over time. Once it reaches that point you either bite the bullet and keep it 100% original, or you pull it all and forget originality. If it's a driver I'd pull it... unless emission laws in your area require you to keep it. Most countries drop emissions checking after a car is 25+ years old, but some (like Japan, I think) don't. Even California exempts cars made in 1975 or earlier (repealed a 30 year rolling exemption in 2005). 76 and later are qualified for an "abbreviated" smog check IF they are at least 35 model years old, at least 25 model years old with Historical Vehicle license plates, or classified as a special interest vehicle.

I wouldn't use the "Nutter Bypass" as that leaves the system hobbled, more of a "limp home" state. It works better than a bunged up emission system, but not like it should. Better to bypass everything with a standard carb and distributor. The CEC distributor can be used, but I prefer to get an older model or a new replacement HEI instead since the timing curve is slightly different. It will run better than using the Nutter Bypass, but it still may not be quite as good as a fully working emissions system, especially since the system adjusts the carb on the fly. Just like a regular carb system it will be in perfect tune only under perfect conditions, or the conditions it was tuned for. The CEC system used an O2 sensor and made minor adjustments, which at least in theory should improve gas mileage and power. Not in large increments, 1-2 mpg, 3-5 hp, maybe up to 7-8 hp. Best to get something like a Sniper TBI and replace it all. Any EFI system should be superior to a factory correct/new CEC system, and worth the money and effort if you really intend to drive it for regular transportation. That's why I put a 4.0L with EFI in my 63 Classic.


-------------
Frank Swygert


Posted By: tomj
Date Posted: Dec/16/2019 at 11:30pm
Yeah, MIPS, don't feel bad, you drew out a heck of a lot of information. Knowing when to stop is an advanced skill! It was pretty interesting what you got out of it.

I've often thought of writing closed-loop TBI code or occasionally closed-loop carb. Some equiv. to a 200 cfm 1V carb, 150 hp, with mainly self-tuning for altitude. Something like GM's TBI 2-dimensional RPM vs. mani pressure system, but with a wideband sensor. Knock off all the complicated features. But then I come back to my senses.

Thanks for the work and the pics of nifty, obscure AMC gear!



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: abzman
Date Posted: May/10/2020 at 12:20am
MIPS, 

I'm new to the game when it comes to reverse engineering this system, but I've got some electronics skills that I may be able to help out with.  I have a 1984 Eagle currently functioning well, but it also came with a bunch of spares.  I have a spare second generation computer you've shown here and may be able to dump the program out of it.  Were you able to trace enough of the schematic to determine if that's likely the same processor, just relabeled? I know that connector for the earlier computer is expensive, but what's inside it for terminals, might this be a thing someone could design and have 3d printed (just insert the terminals, or make it a pigtail).  I'm also somewhat interested in the code in the processor of the original diagnostic computer.  I know you posted the roms of the different modules, but the code in the cpu could be helpful in reverse engineering and building a duplicate of that tester.  Since I have the later model computer my connector is just an edge connector so for me making a replacement pcb would not be as much effort.  

Let me know any way I can help, 
Evan


Posted By: MIPS
Date Posted: May/10/2020 at 2:40pm
I'm fairly certain the Microcontroller in the 83 and later MCU's is still just an MCS-48, judging how the supporting circuitry is so similar the the CeC. The MCS-48 uses an external crystal on pins 2 and 3 whereas the MCS-51 which was its successor puts the crystal inputs on pins 18 and 19.

The diagnostic tool itself also uses an MCS-48. It's located behind the front of the tool and is a UV rewritable variant. Again, I do not have the adapter needed to dump it as well. The larger problem is the removable diagnostic ROM piggybacks a large IC that has no markings (on either side) other than it was manufactured by National Semiconductor. My suspicion is that the MCS-48 in the tool is running as a VFD display controller and the unknown chip is actually the main microcontroller which relies on the Diagnostic ROM to operate.





Also don't forget that the harness pinout for your MCU is listed near the back of the ET-501's manual I linked to.

Edited: It's funny actually, someone was talking to me about the Super-D last night. I was sent a partial photograph of the MCU from an 87 year Jeep and while it's clear there was a revision at some point the layout is still quite similar. (and STILL uses an MCS-48, because why reinvent the wheel?) I wonder what that soldered jumper is for?



Posted By: abzman
Date Posted: Jul/16/2020 at 8:44am
I want to believe that the chip with the socket on top is just a pinout adapter and contains no smarts because I've never seen anything like it and wouldn't know where to start in guessing what it is or figuring out how it's hooked up


Posted By: FLynes
Date Posted: Jul/31/2020 at 1:19pm
I love reading threads like this, because electronics fascinates me. My father was an electronics engineer at Westinghouse from 1974-1990 and I remember him bringing home these massive HP computers with tiny screens, so he could repair them and run diagnostics. I remember playing Blackjack on one.

If you guys are at a standstill with this project, you might want to reach out to a guy on YouTube, who is an electronics guru, named Paul Carlson. His channel is "Mr. Carlson's Lab". He specializes in old tube electronics, but he also has a newer Pontiac Firebird and has done some modifications to its computer system.

Reading your journey into discovering what makes the CeC tick definitely makes me appreciate the Prestolite ignition system and Carter YF in my CJ-5, although I will admit that I've been very tempted to take my spare module apart to see the guts. I fully understand about talking to brick walls, because so many people, lead by a self-proclaimed ignition expert on the Jeep Forum, are convinced that the Prestolite ignition is crap but, in reality, much like your O2 sensors, it's a matter of Preventative Maintenance. BTW, my ignition and fuel system is still 100% original and I get between 21-23 MPG highway up here in Idaho, 17-19 MPG in the city.

Good luck with your endeavors.


-------------
Fred

1976 CJ-5
<font color=LIME GREEN>Lime Green[/COLOR]
258/T-150
3.54:1


Posted By: MIPS
Date Posted: Oct/28/2020 at 8:29pm
Funny enough, Mr. Carlson lives a few hours west of me down on the coast. I drive past his neck of the woods a few times a year. Legend has it AvE is even closer, but nobody knows for sure.
I'm not even sure how you would get in touch with Carlson. Ever since youtube abandoned private messaging years ago I've had no clue how to contact other users.


Posted By: 5704nMango
Date Posted: Jan/11/2021 at 5:47am
Thanks for all your information on the 196,you have given me the confidence to work on mine. I have a 1962 Rambler American that needs work, engine and body. I have a ton of questions I would like to ask you


Posted By: ciostko
Date Posted: Feb/07/2021 at 5:50pm
Hello, I'm in the process of writing my Master Thesis. I will be conducting tests on parts from the inline 6 cylinder 4.0L Jeep engine. I need to find out what materials each component is made of and whether they have any anti-wear coatings. Parts that interest me: - engine block (especially cylinders / sleeves) - crankshaft - pistons - piston pins - piston rings - main and crank bearings - camshaft - camshaft cams - inlet and outlet valves I don't need the percentages of the individual alloys. I just need general information about what is there. I look forward to hearing from you. Could you be that kind and help me? Or tell me where can I find those informations?
Best regards


Posted By: MIPS
Date Posted: Aug/17/2022 at 12:49am
I am still working away at this. It has slipped further down the list of things to do but in the last few months I was asked what could cause the stepper motor driver to blow up as it seems it has happened multiple times to multiple people

As I believe I mentioned a few pages back, the stepper motor on the feedback Carter 2bbd is a 2-phase center tapped device that connects directly to the computer. Inside it is driven by a 16-pin DIP made by National Semiconductor but Ford has put their own custom marking on the chip which you will not find in any parts catalog which makes it very hard to determine what the chip really is and made even harder by the possibility it has not been in production for decades. The best you can do is look at the circuit around the chip to see how the circuit is designed. I went back to my computers and came up with this:



It isn't a dedicated stepper motor driver chip. (which is a little bit of a relief) Two identical chips are used to drive the stepper motor and the solenoids for the Air Management System, the vacuum control of the Sol-Vac and I think the Idle Speed Relay. They are likely high current drivers. Four data lines come directly from the microprocessor, power goes in, you have grounding and you have the signal outputs. In this case the outputs are not "pulled high" (that is the "off" state is equal to ground) but "pulled low" (the "on" state is equal to ground). The stepper motor and everything else when the computer is powered is also getting battery voltage full-time. It just needs the driver to complete the path to ground and the driver is there in the first place because microcontrollers on their own are pretty lousy at doing this and it typically protects the microcontroller in the event of a fault.
Why does this matter? The hint was a sticker inside the carrying case for my ET-501 tester warning that when testing vehicles equipped with secondary air, make sure the solenoids are not shorted BEFORE connecting the tool. If the solenoids are shorted (or more likely, the https://en.wikipedia.org/wiki/Flyback_diode" rel="nofollow - flywheel diode has failed in a dead short) when you apply power you force battery voltage with no current limiter into the tester and fry it. The same applies to the drivers in the computer. If the solenoids or stepper shorts directly between battery voltage and the signal pin there is probably no protection mechanism in the chip as the windings should of been doing this for you and it blows up as soon as it tries to pull the line to ground.


Posted By: MIPS
Date Posted: Aug/20/2023 at 3:36pm
I think I did it. The adapter came in and the ROM seemed to dump and verify back to the microcontroller with the same checksum.



I have NOT however verified if it was a *GOOD* dump. The only way to do that is write the binary back to another chip (like the Intel 8749 which is the same chip, but with a window so you can erase and reprogram the ROM using a UV lamp), plug that back into the CeC and run the MCU test on the ET-501 but right now my programmer has enough umpf to read but fails while trying to write.

So nobody break out the champagne just yet, if reverse engineering an 80's emission system is something to celebrate. In the meantime I quickly fed it through a code disassembler. The code below is from a 1982 model year Eagle with Canadian emissions. It is untested to confirm if it's actually valid.

;
;     Disassembled by:
;          DASMx object code disassembler
;          (c) Copyright 1996-2003   Conquest Consultants
;          Version 1.40 (Oct 18 2003)
;
;     File:          1982_CDN.BIN
;
;     Size:          2048 bytes
;     Checksum:     706E
;     CRC-32:          29F2FF0A
;
;     Date:          Sun Aug 20 13:08:45 2023
;
;     CPU:          Intel 8048 (MCS-48 family)
;
;
;
     org     00000H
;
     sel     mb0
     jmp     L0100
;
L0003:
     dis     i
     sel     mb0
     jmp     L045A
;
     sel     mb0
     sel     rb1
     mov     r2,a
     mov     a,#0F4H
     mov     t,a
     inc     r4
     mov     a,r4
     jnz     L0013
     mov     r4,#0FFH
L0013:
     mov     r0,#04BH
     mov     a,@r0
     jz     L001A
     dec     a
     mov     @r0,a
L001A:
     call     L07EE
     mov     r0,#054H
     mov     a,@r0
     jz     L0022
     inc     @r0
L0022:
     mov     r0,#02FH
     mov     a,@r0
     jz     L0028
     inc     @r0
L0028:
     jnz     L002C
     anl     p1,#0BFH
L002C:
     mov     r0,#030H
     mov     a,@r0
     jz     L0034
     inc     @r0
     jmp     L0040
;
L0034:
     mov     @r0,#0F6H
     call     L04EC
     mov     r0,#032H
     mov     a,@r0
     mov     r0,#02FH
     mov     @r0,a
     orl     p1,#040H
L0040:
     sel     rb0
     mov     a,r3
     add     a,#09BH
     jc     L0003
     sel     rb1
     clr     c
     jnt1     L004B
     cpl     c
L004B:
     mov     r1,#034H
     mov     a,@r1
     rlc     a
     mov     @r1,a
     mov     r0,#03BH
     jni     L0093
     mov     a,@r0
     jnz     L0095
     cpl     a
     mov     @r0,a
     mov     r0,#052H
     mov     @r0,#0C8H
     mov     r0,#054H
     mov     @r0,#0DAH
     mov     r0,#03DH
     mov     a,@r1
     anl     a,#00FH
     jz     L006D
     xrl     a,#00FH
     jnz     L0075
     cpl     a
L006D:
     mov     @r1,a
     xrl     a,@r0
     jz     L0075
     mov     a,@r1
     mov     @r0,a
     jmp     L0080
;
L0075:
     mov     r1,#038H
     mov     a,@r0
     mov     @r1,a
     mov     r1,#04CH
     xrl     a,@r1
     jz     L0080
     mov     a,@r0
     mov     @r1,a
L0080:
     mov     r0,#039H
     inc     @r0
     mov     a,@r0
     jnz     L008C
     mov     @r0,#0FCH
     mov     a,r4
     mov     r5,a
     mov     r4,#000H
L008C:
     sel     rb0
     mov     a,r5
     jz     L0095
     dec     r5
     jmp     L0095
;
L0093:
     mov     @r0,#000H
L0095:
     call     L0465
     djnz     r6,L00F8
     mov     r6,#005H
     mov     r0,#02BH
     mov     a,@r0
     jnz     L00A6
     mov     r1,#02EH
     inc     @r1
     mov     a,@r1
     jb0     L00D7
L00A6:
     sel     rb0
     mov     a,r3
     sel     rb1
     cpl     a
     add     a,r3
     inc     a
     jz     L00D6
     jnc     L00B3
     dec     r3
     jmp     L00B4
;
L00B3:
     inc     r3
L00B4:
     mov     a,r3
     anl     a,#003H
     add     a,#0BAH
     jmpp     @a                              ;INFO: indirect jump
;
     mov     r6,#0C4H
     dec     r2
     xrl     a,@r0
     orl     p1,#009H
     anl     p1,#0F9H
     jmp     L00D7
;
     orl     p1,#00AH
     anl     p1,#0FAH
     jmp     L00D7
;
     orl     p1,#006H
     anl     p1,#0F6H
     jmp     L00D7
;
     orl     p1,#005H
     anl     p1,#0F5H
     jmp     L00D7
;
L00D6:
     clr     f1
L00D7:
     djnz     r7,L00F8
     mov     r7,#015H
     mov     r0,#050H
     mov     a,@r0
     jz     L00E1
     inc     @r0
L00E1:
     mov     r0,#051H
     mov     a,@r0
     jz     L00E7
     inc     @r0
L00E7:
     sel     rb0
     mov     a,r6
     jz     L00EC
     dec     r6
L00EC:
     sel     rb1
     mov     r0,#04EH
     mov     a,@r0
     jz     L00F6
     inc     a
     mov     @r0,a
     jmp     L00F8
;
L00F6:
     call     L0500
L00F8:
     jmp     L0442
;
L00FA:
     call     L0550
     ret
;
     mov     a,r7
     jmp     L045A
;
L0100:
     mov     r1,#064H
L0102:
     mov     r0,#082H
L0104:
     djnz     r0,L0104
     djnz     r1,L0102
L0108:
     mov     r0,#06FH
     clr     a
L010B:
     mov     @r0,a
     djnz     r0,L010B
     call     L078B
     mov     r0,#036H
     mov     @r0,#032H
     ins     a,bus
     jb4     L0119
     mov     @r0,#019H
L0119:
     mov     a,@r0
     mov     r0,#048H
     mov     @r0,a
     mov     r0,#049H
     mov     @r0,a
     mov     a,#0F4H
     mov     t,a
     en     tcnti
     strt     t
     mov     r3,#064H
     call     L0608
     mov     r3,#032H
     call     L0608
L012D:
     sel     rb1
     mov     a,r5
     sel     rb0
     add     a,#01BH
     jnc     L0136
     jmp     L012D
;
L0136:
     mov     r0,#031H
     mov     @r0,#0EAH
     jmp     L013C
;
L013C:
     sel     mb0
     en     tcnti
     call     L04A9
     call     L0712
     in     a,p2
     jb6     L0149
     mov     a,#089H
     jmp     L014B
;
L0149:
     mov     a,#091H
L014B:
     sel     rb1
     add     a,r5
     sel     rb0
     jnc     L0156
     mov     a,r4
     anl     a,#0FBH
     mov     r4,a
     jmp     L015A
;
L0156:
     mov     a,r4
     orl     a,#004H
     mov     r4,a
L015A:
     call     L02E3
     mov     r0,#036H
     mov     @r0,#032H
     ins     a,bus
     jb4     L0165
     mov     @r0,#019H
L0165:
     mov     r1,#03CH
     mov     r0,#02AH
     mov     a,@r0
     mov     r0,#05EH
     mov     @r0,a
     xrl     a,@r1
     mov     r0,#041H
     mov     @r0,#0FFH
     jnz     L0176
     mov     @r0,#000H
L0176:
     mov     r1,#05EH
     mov     a,@r1
     anl     a,#007H
     xrl     a,#005H
     jnz     L0186
     mov     r1,#043H
     mov     a,@r1
     jz     L0186
     mov     @r0,#0FFH
L0186:
     mov     r0,#05EH
     mov     a,@r0
     mov     r1,#03CH
     mov     @r1,a
     mov     r0,#037H
     mov     @r0,#000H
     sel     rb1
     mov     a,r5
     sel     rb0
     add     a,#0DAH
     jc     L0199
     mov     @r0,#0FFH
L0199:
     jmp     L060D
;
L019B:
     mov     @r1,#0FCH
     call     L0542
L019F:
     mov     r0,#036H
     mov     a,@r0
     jmp     L0405
;
L01A4:
     call     L03D8
L01A6:
     call     L0542
L01A8:
     mov     r0,#036H
     mov     a,@r0
     add     a,#021H
     jmp     L0405
;
L01AF:
     mov     a,@r0
     jz     L01B6
     call     L01F2
     jmp     L01A6
;
L01B6:
     mov     @r1,#0FEH
     jmp     L01A6
;
L01BA:
     mov     @r1,#0FFH
     jmp     L0300
;
L01BE:
     call     L03D8
     jmp     L01A6
;
L01C2:
     mov     @r1,#0FEH
     jmp     L0300
;
L01C6:
     mov     a,@r0
     jz     L01CD
     mov     @r1,#0FCH
     jmp     L05BB
;
L01CD:
     call     L03E8
     jmp     L05BB
;
L01D1:
     mov     a,@r0
     jz     L01D8
     mov     @r1,#0FCH
     jmp     L05C8
;
L01D8:
     call     L03E8
     jmp     L05C8
;
L01DC:
     mov     a,@r0
     jz     L01E3
     mov     @r1,#0FDH
     jmp     L01E5
;
L01E3:
     call     L0200
L01E5:
     jmp     L05BB
;
L01E7:
     mov     a,@r0
     jz     L01EE
     mov     @r1,#0FDH
     jmp     L01F0
;
L01EE:
     call     L0200
L01F0:
     jmp     L05C8
;
L01F2:
     in     a,p2
     jb0     L01F8
     mov     @r1,#0FEH
     ret
;
L01F8:
     mov     @r1,#0FDH
     ret
;
     mov     a,r7
     mov     a,r7
     mov     a,r7
     jmp     L045A
;
L0200:
     jt0     L0205
     mov     @r1,#0FDH
     ret
;
L0205:
     mov     @r1,#0FEH
     ret
;
L0208:
     mov     a,r4
     anl     a,#0FEH
     mov     r4,a
     mov     r0,#041H
     mov     a,@r0
     jnz     L021A
     jf1     L022F
     mov     r1,#038H
     mov     a,@r1
     jz     L0231
     jmp     L02A7
;
L021A:
     mov     a,r4
     orl     a,#02AH
     anl     a,#0BFH
     mov     r4,a
     mov     r0,#05EH
     mov     a,@r0
     jb2     L0229
     mov     r0,#048H
     jmp     L022B
;
L0229:
     mov     r0,#049H
L022B:
     mov     a,@r0
     mov     r3,a
     clr     f1
     cpl     f1
L022F:
     jmp     L013C
;
L0231:
     mov     a,r4
     orl     a,#008H
     mov     r4,a
     mov     a,r4
     anl     a,#002H
     jnz     L026A
     mov     a,r5
     jnz     L022F
     mov     r0,#04BH
     mov     a,@r0
     jnz     L022F
     mov     r0,#033H
     mov     a,@r0
     jz     L0249
     jmp     L0257
;
L0249:
     mov     r0,#05EH
     mov     a,@r0
     anl     a,#007H
     xrl     a,#005H
     jnz     L0260
     mov     a,r4
     anl     a,#004H
     jnz     L0260
L0257:
     mov     a,r3
     jz     L022F
     dec     a
     call     L0530
     mov     r3,a
     jmp     L0264
;
L0260:
     mov     a,r3
     jz     L022F
     dec     r3
L0264:
     clr     f1
     cpl     f1
     call     L0428
     jmp     L013C
;
L026A:
     mov     a,r4
     anl     a,#020H
     jnz     L02A1
     mov     a,r4
     anl     a,#040H
     jnz     L028C
     mov     r0,#02CH
     mov     a,r3
     mov     @r0,a
     mov     r0,#05EH
     mov     a,@r0
     anl     a,#007H
     xrl     a,#005H
     jz     L0283
     call     L04AA
L0283:
     mov     a,#007H
     mov     r6,a
     mov     a,r4
     orl     a,#040H
     mov     r4,a
     jmp     L013C
;
L028C:
     mov     a,r6
     jnz     L022F
     mov     a,r4
     anl     a,#0BDH
     mov     r4,a
L0293:
     mov     r0,#02CH
     mov     a,@r0
     mov     r0,#02DH
     add     a,@r0
     inc     a
     clr     c
     rrc     a
     mov     r3,a
     clr     f1
     cpl     f1
     jmp     L013C
;
L02A1:
     mov     a,r4
     anl     a,#0DDH
     mov     r4,a
     jmp     L013C
;
L02A7:
     mov     a,r4
     orl     a,#002H
     mov     r4,a
     mov     a,r4
     anl     a,#008H
     jnz     L02C0
     mov     a,r5
     jnz     L022F
     mov     r0,#04BH
     mov     a,@r0
     jnz     L022F
     mov     a,r3
     add     a,#09CH
     jc     L022F
     inc     r3
     jmp     L0264
;
L02C0:
     mov     a,r4
     anl     a,#020H
     jnz     L02DD
     mov     a,r4
     anl     a,#040H
     jnz     L02D4
     mov     r0,#02DH
     mov     a,r3
     mov     @r0,a
     mov     a,r4
     orl     a,#040H
     mov     r4,a
     jmp     L013C
;
L02D4:
     mov     a,r6
     jnz     L022F
     mov     a,r4
     anl     a,#0B7H
     mov     r4,a
     jmp     L0293
;
L02DD:
     mov     a,r4
     anl     a,#0D7H
     mov     r4,a
     jmp     L013C
;
L02E3:
     mov     r0,#042H
     mov     a,r4
     anl     a,#004H
     xrl     a,@r0
     mov     r1,#043H
     jz     L02F1
     mov     @r1,#0FFH
     jmp     L02F3
;
L02F1:
     mov     @r1,#000H
L02F3:
     mov     a,r4
     anl     a,#004H
     mov     @r0,a
     ret
;
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     jmp     L045A
;
L0300:
     call     L0542
     mov     r0,#036H
     mov     a,@r0
     add     a,#02AH
     jmp     L0405
;
L0309:
     call     L03D8
     jf0     L0314
L030D:
     call     L0550
L030F:
     mov     r0,#048H
     mov     a,@r0
     jmp     L0405
;
L0314:
     call     L0547
     jmp     L0400
;
L0318:
     mov     @r1,#0FEH
L031A:
     call     L0550
     jmp     L01A8
;
L031E:
     mov     a,@r0
     jz     L0325
     call     L01F2
     jmp     L0327
;
L0325:
     mov     @r1,#0FEH
L0327:
     jf0     L0314
     jmp     L030D
;
L032B:
     mov     @r1,#0FFH
     jmp     L031A
;
L032F:
     jf0     L034F
     mov     a,r4
     anl     a,#004H
     jnz     L0349
     mov     @r1,#0F9H
     call     L0550
L033A:
     mov     r0,#036H
     ins     a,bus
     jb6     L0344
     mov     a,#00FH
     add     a,@r0
     jmp     L0405
;
L0344:
     mov     a,#019H
     add     a,@r0
     jmp     L0405
;
L0349:
     mov     @r1,#0FCH
     call     L0547
     jmp     L0208
;
L034F:
     mov     a,r4
     anl     a,#004H
     jnz     L035A
     mov     @r1,#0F9H
     call     L0550
     jmp     L033A
;
L035A:
     mov     @r1,#0FCH
     call     L0547
     jmp     L033A
;
L0360:
     mov     a,r4
     anl     a,#004H
     jnz     L0369
     mov     @r1,#0FAH
     jmp     L036B
;
L0369:
     mov     @r1,#0FCH
L036B:
     call     L0550
     jmp     L033A
;
L036F:
     call     L03D8
     call     L0542
     mov     r0,#048H
     mov     a,@r0
     add     a,#021H
     jmp     L0405
;
L037A:
     mov     a,@r0
     jz     L0381
     mov     @r1,#0FDH
     jmp     L05BB
;
L0381:
     call     L0200
     jmp     L05BB
;
L0385:
     mov     a,@r0
     jz     L038C
     mov     @r1,#0FDH
     jmp     L05C8
;
L038C:
     call     L0200
     jmp     L05C8
;
L0390:
     mov     a,@r0
     jz     L0397
     mov     @r1,#0FEH
     jmp     L0399
;
L0397:
     call     L05ED
L0399:
     call     L0550
     jmp     L019F
;
L039D:
     mov     a,@r0
     jz     L03A4
     mov     @r1,#0FEH
     jmp     L0300
;
L03A4:
     call     L05ED
     jmp     L0300
;
L03A8:
     mov     a,@r0
     jz     L03AF
     mov     @r1,#0FEH
     jmp     L0399
;
L03AF:
     call     L05ED
     jmp     L0399
;
L03B3:
     mov     a,@r0
     jz     L03BA
     mov     @r1,#0FFH
     jmp     L0300
;
L03BA:
     mov     @r1,#000H
     jmp     L0300
;
L03BE:
     mov     a,r4
     anl     a,#004H
     jnz     L03C7
     mov     @r1,#0F9H
     jmp     L0300
;
L03C7:
     mov     @r1,#0FCH
     jmp     L0300
;
L03CB:
     mov     a,r4
     anl     a,#004H
     jnz     L03D4
     mov     @r1,#0F9H
     jmp     L0300
;
L03D4:
     mov     @r1,#0FCH
     jmp     L0300
;
L03D8:
     sel     rb1
     mov     a,r5
     sel     rb0
     add     a,#0E9H
     jc     L03E5
     in     a,p2
     jb1     L03E5
     mov     @r1,#0FEH
     ret
;
L03E5:
     mov     @r1,#0FDH
     ret
;
L03E8:
     in     a,p2
     jb3     L03EE
     mov     @r1,#0FDH
     ret
;
L03EE:
     mov     @r1,#0FCH
     ret
;
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     jmp     L045A
;
L0400:
     mov     r0,#036H
     mov     a,@r0
     jmp     L0405
;
L0405:
     mov     r1,a
     mov     r0,#05EH
     mov     a,@r0
     anl     a,#007H
     xrl     a,#005H
     jnz     L0419
     mov     a,r4
     anl     a,#004H
     jnz     L0419
     mov     a,r1
     call     L0530
     jmp     L041A
;
L0419:
     mov     a,r1
L041A:
     add     a,#09CH
     jnc     L041F
     clr     a
L041F:
     add     a,#064H
     mov     r3,a
     mov     a,r4
     orl     a,#001H
     mov     r4,a
     jmp     L013C
;
L0428:
     sel     rb1
     mov     a,r5
     sel     rb0
     add     a,#0D6H
     jnc     L0439
     sel     rb1
     mov     a,r5
     sel     rb0
     add     a,#0C1H
     jnc     L043D
     mov     r5,#008H
     ret
;
L0439:
     mov     a,#00CH
     mov     r5,a
     ret
;
L043D:
     mov     r0,#04BH
     mov     @r0,#07DH
     ret
;
L0442:
     mov     a,psw
     dec     a
     anl     a,#007H
     add     a,#0FAH
     jc     L045A
     add     a,#006H
     rl     a
     add     a,#009H
     mov     r1,a
     mov     a,@r1
     anl     a,#00FH
     add     a,#0F8H
     jc     L045A
     mov     a,r2
     en     tcnti
     retr
;
L045A:
     dis     tcnti
     dis     i
     clr     a
     mov     psw,a
     sel     mb0
     call     L04A9
     sel     rb0
     movx     a,@r0
     jmp     L0108
;
L0465:
     sel     rb1
     mov     r0,#029H
     mov     r1,#028H
     ins     a,bus
     anl     a,#03FH
     xch     a,@r0
     xrl     a,@r0
     jz     L0475
     mov     @r1,#0FDH
     jmp     L04A0
;
L0475:
     inc     @r1
     mov     a,@r1
     jnz     L04A0
     mov     a,@r0
     mov     r0,#02AH
     mov     @r0,a
     anl     a,#01DH
     xrl     a,#011H
     jnz     L0487
     mov     r0,#03AH
     mov     @r0,#0CAH
L0487:
     sel     rb0
     mov     a,r4
     anl     a,#080H
     jnz     L04A0
     sel     rb1
     mov     r0,#02AH
     mov     a,@r0
     anl     a,#007H
     xrl     a,#004H
     jz     L04A2
     mov     a,@r0
     anl     a,#007H
     jz     L04A2
     mov     r0,#033H
     mov     @r0,#010H
L04A0:
     sel     rb1
     ret
;
L04A2:
     sel     rb0
     mov     a,r4
     orl     a,#080H
     mov     r4,a
     sel     rb1
     ret
L04A9:
     retr
;
L04AA:
     mov     r1,#05EH
     mov     a,@r1
     jb2     L04B3
     mov     r1,#048H
     jmp     L04B5
;
L04B3:
     mov     r1,#049H
L04B5:
     mov     r0,#02CH
     mov     a,@r0
     mov     r0,#02DH
     add     a,@r0
     clr     c
     rrc     a
     clr     c
     add     a,@r1
     add     a,@r1
     jc     L04C5
     add     a,@r1
     jmp     L04C8
;
L04C5:
     add     a,@r1
     clr     c
     cpl     c
L04C8:
     rrc     a
     clr     c
     rrc     a
     jnc     L04CE
     inc     a
L04CE:
     mov     @r1,a
L04CF:
     ret
;
L04D0:
     mov     @r1,#0FEH
     jmp     L0300
;
L04D4:
     mov     a,r4
     anl     a,#004H
     jnz     L04DD
     mov     @r1,#0FAH
     jmp     L0300
;
L04DD:
     mov     @r1,#0FCH
     jmp     L0300
;
L04E1:
     mov     a,@r0
     jz     L04E8
     mov     @r1,#0FFH
     jmp     L0399
;
L04E8:
     mov     @r1,#000H
     jmp     L0399
;
L04EC:
     mov     a,r5
     add     a,#0E3H
     jc     L04CF
     ins     a,bus
     jb0     L04FA
     mov     r0,#032H
     mov     a,@r0
     add     a,#0FFH
     mov     @r0,a
L04FA:
     ret
;
     mov     a,r7
     mov     a,r7
     mov     a,r7
     jmp     L045A
;
L0500:
     mov     @r0,#0F7H
     mov     r0,#031H
     mov     a,@r0
     jz     L0508
     inc     @r0
L0508:
     mov     r0,#03EH
     mov     a,@r0
     jz     L050E
     inc     @r0
L050E:
     mov     r0,#03FH
     mov     a,@r0
     jz     L0514
     inc     @r0
L0514:
     mov     r0,#057H
     mov     a,@r0
     jz     L051A
     inc     @r0
L051A:
     mov     r0,#033H
     mov     a,@r0
     jz     L0520
     inc     @r0
L0520:
     mov     r0,#04FH
     mov     a,@r0
     jnz     L052E
     mov     @r0,#0F6H
     mov     r0,#03AH
     mov     a,@r0
     jz     L052D
     inc     @r0
L052D:
     ret
;
L052E:
     inc     @r0
     ret
;
L0530:
     mov     r0,a
     mov     r1,#036H
     mov     a,@r1
     add     a,#0F6H
     cpl     a
     inc     a
     clr     c
     add     a,r0
     jc     L0540
     mov     a,@r1
     add     a,#0F6H
     ret
;
L0540:
     mov     a,r0
     ret
;
L0542:
     orl     p1,#010H
     anl     p1,#0DFH
     ret
;
L0547:
     call     L0559
     jz     L0542
     anl     p1,#0EFH
     anl     p1,#0DFH
     ret
;
L0550:
     call     L0559
     jz     L0542
     anl     p1,#0EFH
     orl     p1,#020H
     ret
;
L0559:
     mov     r0,#03FH
     mov     a,@r0
     jz     L056C
     mov     r0,#03EH
     mov     a,@r0
     jz     L056C
     sel     rb1
     mov     a,r5
     sel     rb0
     cpl     a
     jz     L056C
     mov     a,#0FFH
     ret
;
L056C:
     mov     a,#000H
     ret
;
L056F:
     mov     @r1,#0FEH
     call     L0542
     jmp     L01A8
;
L0575:
     mov     a,@r0
     jz     L057C
     call     L01F2
     jmp     L057E
;
L057C:
     mov     @r1,#0FEH
L057E:
     jf0     L0584
     call     L06F8
     jmp     L030F
;
L0584:
     call     L0700
     jmp     L0400
;
L0588:
     mov     @r1,#0FFH
     call     L06F8
     jmp     L01A8
;
L058E:
     mov     a,r4
     anl     a,#004H
     jnz     L059B
     mov     @r1,#0F9H
     jf0     L0597
L0597:
     call     L06F8
L0599:
     jmp     L033A
;
L059B:
     mov     @r1,#0FCH
     call     L0700
     jf0     L0599
     jmp     L0208
;
L05A3:
     mov     a,r4
     anl     a,#004H
L05A6:
     jnz     L05AC
     mov     @r1,#0FAH
     jmp     L05AE
;
L05AC:
     mov     @r1,#0FCH
L05AE:
     call     L06F8
     jmp     L033A
;
L05B2:
     mov     a,@r0
     jz     L05B9
     mov     @r1,#0FCH
     jmp     L05BB
;
L05B9:
     call     L03E8
L05BB:
     jf0     L05CE
     jmp     L070B
;
L05BF:
     mov     a,@r0
     jz     L05C6
     mov     @r1,#0FCH
     jmp     L05C8
;
L05C6:
     call     L03E8
L05C8:
     call     L0547
     jf0     L05D0
     jmp     L0208
L05CE:
     jmp     L0300
L05D0:
     jmp     L019F
;
L05D2:
     mov     r0,#031H
     mov     @r0,#000H
     mov     r0,#057H
     mov     @r0,#000H
     mov     r0,#050H
     mov     @r0,#000H
     mov     r0,#051H
     mov     @r0,#000H
     jmp     L019B
L05E4:
     jmp     L0600
;
L05E6:
     mov     a,@r0
     jz     L05E4
     mov     @r1,#0FEH
     jmp     L0300
;
L05ED:
     in     a,p2
     jb2     L05F3
     mov     @r1,#0FFH
     ret
;
L05F3:
     mov     @r1,#0FEH
     ret
;
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     mov     a,r7
     jmp     L045A
;
L0600:
     call     L05ED
     jmp     L0300
;
     mov     @r1,#0FEH
     jmp     L0300
;
L0608:
     clr     f1
     cpl     f1
L060A:
     jf1     L060A
     ret
;
L060D:
     clr     f0
     mov     r0,#031H
     mov     a,@r0
     jz     L0614
     cpl     f0
L0614:
     mov     r0,#05EH
     mov     a,@r0
     anl     a,#03DH
     xrl     a,#039H
     jz     L0621
     mov     r1,#03EH
     mov     @r1,#0E2H
L0621:
     mov     a,@r0
     anl     a,#025H
     xrl     a,#025H
     jz     L062C
     mov     r1,#03FH
     mov     @r1,#0C4H
L062C:
     mov     r1,#032H
     mov     r0,#05EH
     mov     a,@r0
     mov     r0,#037H
     add     a,#036H
     jmpp     @a                              ;INFO: indirect jump
;
     jf1     L0678
     addc     a,r2
     addc     a,r4
     addc     a,r6
     movx     a,@r0
;
     db     082H
;
     jmp     L0486
;
     orl     bus,#08AH
     orld     p4,a
     orld     p6,a
     movx     @r0,a
     jb4     L0694
     jnz     L0698
     anl     p2,#09CH
     anld     p6,a
     mov     @r0,a
;
     db     0A2H
;
     jmp     L05A6
;
     mov     r0,a
     mov     r2,a
     mov     r4,a
     mov     r6,a
     mov     @r0,#0B2H
     call     L05B6
     mov     r0,#0BAH
     mov     r4,#0BEH
;
     db     0C0H, 0C2H
;
     jmp     L06C6
;
     dec     r0
     dec     r2
     dec     r4
     dec     r6
     xrl     a,@r0
     jb6     L06D4
;
     db     0D6H
;
     xrl     a,r0
     xrl     a,r2
     xrl     a,r4
     xrl     a,r6
;
     db     0E0H, 0E2H
;
     jmp     L07E6
;
     djnz     r0,L06EA
     djnz     r4,L06EE
     mov     a,@r0
     jb7     L06F4
     jmp     L05D2
L0678:
     jmp     L01A4
     jmp     L019B
     jmp     L04D0
     jmp     L019B
     jmp     L019B
     jmp     L019B
     jmp     L019B
     jmp     L05B2
     jmp     L01AF
     jmp     L05E6
     jmp     L01BA
     jmp     L01DC
     jmp     L03BE
     jmp     L07D8
L0694:
     jmp     L04D4
     jmp     L019B
L0698:
     jmp     L01BE
     jmp     L019B
     jmp     L01C2
     jmp     L019B
     jmp     L019B
     jmp     L019B
     jmp     L019B
     jmp     L01C6
     jmp     L07CD
     jmp     L039D
     jmp     L01BA
     jmp     L037A
     jmp     L03CB
     jmp     L03B3
     jmp     L04D4
     jmp     L019B
     jmp     L0309
     jmp     L019B
     jmp     L0318
     jmp     L019B
     jmp     L019B
     jmp     L019B
     jmp     L019B
L06C6:
     jmp     L05BF
     jmp     L031E
     jmp     L0390
     jmp     L032B
     jmp     L01E7
     jmp     L032F
     jmp     L04E1
L06D4:
     jmp     L0360
     jmp     L019B
     jmp     L036F
     jmp     L019B
     jmp     L056F
     jmp     L019B
     jmp     L019B
     jmp     L019B
     jmp     L019B
     jmp     L01D1
     jmp     L0575
L06EA:
     jmp     L03A8
     jmp     L0588
L06EE:
     jmp     L0385
     jmp     L058E
     jmp     L07E3
L06F4:
     jmp     L05A3
L06F6:
     jmp     L00FA
;
L06F8:
     mov     r0,#03AH
     mov     a,@r0
     jz     L06F6
     call     L0542
     ret
;
L0700:
     mov     r0,#03AH
     mov     a,@r0
     jz     L0708
     call     L0542
     ret
;
L0708:
     call     L0547
     ret
;
L070B:
     call     L0542
     mov     r0,#036H
     mov     a,@r0
     jmp     L0405
;
L0712:
     mov     r0,#050H
     mov     a,@r0
     jnz     L071E
     mov     r0,#056H
     mov     a,@r0
     jnz     L071E
     anl     p2,#0EFH
L071E:
     mov     r0,#051H
     mov     a,@r0
     jnz     L0725
     anl     p2,#0DFH
L0725:
     mov     r0,#057H
     mov     a,@r0
     jz     L072F
     mov     r0,#051H
     mov     @r0,#0F6H
     ret
;
L072F:
     ins     a,bus
     jb5     L0738
     orl     p2,#010H
     mov     r0,#050H
     mov     @r0,#0F6H
L0738:
     mov     r0,#052H
     mov     a,@r0
     jnz     L074D
     orl     p2,#010H
     orl     p2,#020H
     mov     r0,#050H
     mov     @r0,#0FCH
     mov     r0,#051H
     mov     @r0,#0E7H
     mov     r0,#055H
     mov     @r0,#0FFH
L074D:
     mov     r0,#055H
     mov     a,@r0
     jz     L0764
     mov     r1,#05EH
     mov     a,@r1
     jb0     L0760
     mov     r1,#051H
     mov     a,@r1
     jnz     L0764
     mov     @r0,#000H
     jmp     L0764
;
L0760:
     mov     r0,#051H
     mov     @r0,#0E7H
L0764:
     mov     r0,#05EH
     mov     a,@r0
     anl     a,#005H
     xrl     a,#005H
     jnz     L0777
     mov     r0,#054H
     mov     a,@r0
     jnz     L078A
     mov     r0,#053H
     mov     @r0,#0FFH
     ret
;
L0777:
     mov     r0,#053H
     mov     a,@r0
     jz     L078A
     mov     @r0,#000H
     orl     p2,#010H
     orl     p2,#020H
     mov     r0,#051H
     mov     @r0,#0E7H
     mov     r0,#056H
     mov     @r0,#098H
L078A:
     ret
;
L078B:
     mov     a,#0F9H
     outl     p1,a
     orl     p2,#0FFH
     orl     p1,#020H
     anl     p1,#0EFH
     sel     rb1
     mov     r5,#0FFH
     mov     r7,#015H
     mov     r6,#005H
     sel     rb0
     mov     r0,#051H
     mov     @r0,#0CEH
     mov     r0,#050H
     mov     @r0,#06AH
     mov     r0,#057H
     mov     @r0,#0C4H
     mov     r0,#052H
     mov     @r0,#0C8H
     mov     r0,#054H
     mov     @r0,#0DAH
     mov     r0,#02CH
     mov     @r0,#032H
     inc     r0
     mov     @r0,#032H
     mov     r0,#03EH
     mov     @r0,#0E2H
     mov     r0,#03FH
     mov     @r0,#0C4H
     mov     r0,#039H
     mov     @r0,#0FCH
     mov     r4,#00BH
     ins     a,bus
     jb1     L07CC
     mov     a,r4
     orl     a,#080H
     mov     r4,a
L07CC:
     ret
;
L07CD:
     mov     a,@r0
     jz     L07D4
     call     L01F2
     jmp     L01A6
;
L07D4:
     mov     @r1,#0FEH
     jmp     L01A6
;
L07D8:
     mov     a,@r0
     jz     L07DF
     mov     @r1,#0FFH
     jmp     L0300
;
L07DF:
     mov     @r1,#000H
     jmp     L0300
;
L07E3:
     mov     a,@r0
     jz     L07EA
L07E6:
     mov     @r1,#0FFH
     jmp     L0399
;
L07EA:
     mov     @r1,#000H
     jmp     L0399
;
L07EE:
     mov     r0,#052H
     mov     a,@r0
     jz     L07F4
     inc     @r0
L07F4:
     mov     r0,#056H
     mov     a,@r0
     jz     L07FA
     inc     @r0
L07FA:
     ret
;
     mov     a,r7
     mov     a,r7
     mov     a,r7
     jmp     L045A


Posted By: 6PakBee
Date Posted: Aug/20/2023 at 8:26pm
I am no computer guru, far from it.  But that code dump looks like assembly language.  Move, jump, clear, decrement......  Am I close?


-------------
Roger Gazur
1969 'B' Scheme SC/Rambler
1970 RWB 4-spd Machine
1970 Sonic Silver auto AMX

All project cars.

Forum Cockroach


Posted By: MIPS
Date Posted: Aug/20/2023 at 10:48pm
You are correct.
Because at that time in history, space was a major limiting factor in computers, the CEC was programmed entirely in assembly. The ROM, or "firmware" as we call it now takes up an entire 2 kilobytes of space. Prior to being written to the ROM the assembly code is compiled to collapse it down further, remove any code commenting that isn't needed in the final product and brings all the components created in the development environment together into one object. Once it's compiled you cannot get any fancy formatting or code comments back, so a utility like DASMx can de-compile the ROM back to how it was (probably) written but we cannot see anything the programmer might of wanted to point out, like state branches, mode switches or how/when it responds to malfunctions. It's up to someone far more educated in assembly (in this case for the MCS-48) to look at the code and see what it's doing.

Between the family reference manual and the programmers reference Intel alone has some 600 pages of documentation. I will admit this is over my head as I am more a hardware person.


Posted By: farna
Date Posted: Aug/21/2023 at 9:59am
I don't know how much assembly experience Tom Jennings has, but hopefully he will see this and make some comments... even if it's "over my head too"...


-------------
Frank Swygert


Posted By: MIPS
Date Posted: Aug/21/2023 at 11:58am
The goal was that it helps deal with the two most common failures of the CEC:

-Blown output drivers due to wiring problems (I reverse engineered the chip pinout on the previous page, so now we know what to expect when replacing or substituting them.

-Failures associated to "bit rot" as the microcontroller ages. The chip selected by Ford and OEM'd to AMC allows you to select an external ROM and disable the internal ROM by pulling one pin.

Optionally, the Jeep crowd already has experience with the design of the Renix computers. 80's era AMC's are only now starting to gain interest with younger crowds, but there is no substantial amount of technical information to start with for when our computers develop faults. I'm hoping that by going as in-depth as I have I can provide a starting point for anyone else in the years following, rather than it remaining a mystery. That and I'm bored and need to do something to keep myself busy at times.

It does however open the door if someone wishes to completely reverse-engineer the code to substitute computers without alterations to the vehicle harness, since retrieving the firmware was one of if not the hardest part. This was mentioned a few pages back. That especially is far beyond my technical knowledge at this time.


Posted By: tomj
Date Posted: Sep/08/2023 at 2:16pm
Wow, you've really got a hand on this thing! So that's the entire ROM listing?

I wrote tons of Intel 8080, z80, 8086, 8051 (superset of the 48) and assembly language on a half dozen other micros and minis.

OK post edited. I read the whole thread again.

What's needed to decipher the code is a schematic of the board, so we can know what sensor is connected (eventually) to what pin on the MCU, and a general sense of what that signal does.

You have an amazing amount of information and state about what signals and what order, appears at the connector.

Code like this is I/O intensive -- lots of those instructions are fiddling with I/O pins.

It's been 30 years, but I wrote a lot of assembly language for most of the early (1970s) micros. I can't commit to taking on the rest of the disassembly (IDing, naming, commenting the code) but I'll gladly help.


Here's a readable and complete copy of the programmers manual for the MCS dev system and the chip(s), just FYI. The one on bitsavers is an OCR mess.

https://original.sharpmz.org/download/8048.pdf" rel="nofollow - https://original.sharpmz.org/download/8048.pdf



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: tomj
Date Posted: Sep/08/2023 at 2:29pm
Originally posted by FSJunkie FSJunkie wrote:

...The ECU continuously monitors the knock sensor and the pulses from the ignition coil indicating a spark plug firing for a power stroke on a cylinder....The ECU performs this function for each cylinder individually so each cylinder runs at it's own unique optimum ignition timing. It has no idea which cylinder is number one.

It's genius.


I missed this 2019 post. 

That is genius, and accomplished with so little information. And in a processor to dumb to run a microwave oven (today).


-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: tomj
Date Posted: Sep/08/2023 at 3:08pm
Originally posted by MIPS MIPS wrote:

The goal was that it helps deal with the two most common failures of the CEC:

-Blown output drivers due to wiring problems (I reverse engineered the chip pinout on the previous page, so now we know what to expect when replacing or substituting them.


I'd watch for blown commutating diodes, across the solenoids to absorb the inductive dump. Old diodes in this service die relatively often. I'd replace, or augment, with a modern Schottky diode, far more rugged than anything from the past. Cheap insurance. Something like this:

https://www.digikey.com/en/products/detail/vishay-general-semiconductor-diodes-division/SB1H100-E3-54/2146191" rel="nofollow - https://www.digikey.com/en/products/detail/vishay-general-semiconductor-diodes-division/SB1H100-E3-54/2146191




-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: tomj
Date Posted: Sep/08/2023 at 7:00pm
That odd-looking 40-pin DIP chip with the socket on the back, appears to be https://en.wikipedia.org/wiki/National_Semiconductor" rel="nofollow - National Semiconductor NS87PC48D, a second-sourced 804x with external 2708 type EPROM socket on top.

https://en.wikipedia.org/wiki/Intel_MCS-48

A photo of one is at the bottom of this Wikipedia page; scroll to just above the very bottom.



-------------
1960 Rambler Super two-door wagon, OHV auto
1961 Roadster American, 195.6 OHV, T5
http://www.ramblerLore.com



Posted By: MIPS
Date Posted: Sep/11/2023 at 8:58pm
Yeah looking back I did a trace-out of the 1982 computer's circuit board but no good front/back photos. The 1984 computer has front/back photos but no layout diagram.
One thing that I could try is pull the IC's and drop them into an "Identifier". they're kind of magic, they probably don't work great and if it's an IC not in its library it won't know what to think of it. On the other hand because it's all probably relabelled parts, as long as they are correct on my assumption of being conventional drivers and op-amps it might let out the last of the secrets.
Unfortunately as I'm sure people have noticed I'm a hardware person and have never programmed software in my life. The instruction reference is handy but it will take me quite a while to comment every line.


Posted By: billd
Date Posted: Sep/11/2023 at 10:50pm
My 82 wiring harness and ECU. Found it interesting what it interfaced with and what it did NOT interface with.....
My "coding" such as it was, was limited to VB Script, and programming Juniper and Cisco firewalls, switches and ASAs (routers)  




-------------


http://theamcpages.com" rel="nofollow - http://theamcpages.com

http://antique-engines.com" rel="nofollow - http://antique-engines.com


Posted By: MIPS
Date Posted: Sep/13/2023 at 2:27pm
There's a considerable amount of confusion on the altitude jumper wire that I've seen. The TSM states it's only used (attached to ground) when you regularly drive above 4000 feet. It also states that you will often find this as a crimped eyelet that bolts to the block somewhere behind the distributor. Some models have the wire but it's tied back and not grounded (low altitude mode). In vehicles like mine there is no jumper, but you will find the eyelet with TWO wires crimped to it, but if you compare continuity from ground to the altitude test pin on the diagnostic connector it's open. https://amceaglesden.com/guide/June_1982_TB_1-09-082:_Altitude_Adjustments" rel="nofollow - There's a bulletin stating that for 82 vehicles you have to add an extra pin to the computer connector and run that to a grounded point to enable high-altitude, if your vehicle was not originally built for high-altitude. Alright so this thing has the jumper and it's reading open so whatever, delete it.
Yeah, no. I've yet to pull the computer out again (really it sucks to reach) but while one of the wires is a mystery to me and isn't listed in the TSM schematics or the CeC wiring diagram, you will notice the other wire on that eyelet is the ground for the computer. It can ground itself through other components of the system, but it was built to ground everything in the CeC harness through here. Remove that and expect to pull your hair out with computer issues, if the computer works at all.

The 1982 TSM lists the pinout for the connector and where it all goes. I might of posted that near the start of the thread. From the connector pinout you look at the circuit layout but at that point I've yet to link the traces to their respective IC's.

Edited: Page 2. It's on page 2.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net