Cars · Electronics

NEC uPD7004C Analog-to-Digital Converter

Technical specifications, pinout mapping, and channel routing for the NEC uPD7004C Analog-to-Digital Converter (ADC) chip in OBD0 MPFI Honda ECUs.

Advanced

Adapted from pgmfi.org wiki

The NEC uPD7004C is a 10-bit Analog-to-Digital Converter (ADC) integrated circuit used in Honda OBD0 Multi-Point Fuel Injection (MPFI) Engine Control Units (ECUs) such as the PM6 and PR3. Its role is to convert analog voltage readings from engine sensors (e.g., MAP, TPS, coolant temp) into digital data that the ECU's main processor can interpret.


Architecture & Programming

While the uPD7004C physically supports 10-bit resolution, Honda's OBD0 code operates the chip in an 8-bit mode equivalent by discarding the 2 least significant bits (LSB). The MCU reads only the high data register, saving RAM space and compute cycles.

Register Mappings

In the Honda OBD0 architecture, the ADC interface uses two memory-mapped registers:

  • 0x4000 (Control Register): Written to initiate a conversion. Sending a channel value (0 to 7) to this address starts a measurement on that channel.
  • 0x4001 (Data Register): Reads the high byte of the converted analog value.

Conversion Loop Workflow

In practice, the conversion sequence is handled periodically by a hardware-driven timer interrupt:

  1. The external interrupt 1 routine jumps to vector address 0x0064h.
  2. The routine reads the current analog value from the high byte data register at 0x4001h.
  3. The low byte register is reset by writing 0 to 0x4001h.
  4. The routine starts the next measurement by writing the desired channel ID (0 to 0x7) to the control register at 0x4000h.
  5. The MCU stores the results in external RAM locations 0x0000h to 0x0006h for channels 0 to 6. Channel 7 utilizes a secondary multiplexer to expand the available inputs.

Pinout Configuration

The uPD7004C is packaged in a 28-pin Dual In-line Package (DIP). Below is the complete pinout configuration when operated in parallel mode (Mode Select pin MC tied high):

Pin Symbol Function Pin Symbol Function
1 CH4 Analog Input Channel 4 28 CH3 Analog Input Channel 3
2 CH5 Analog Input Channel 5 27 CH2 Analog Input Channel 2
3 CH6 Analog Input Channel 6 26 CH1 Analog Input Channel 1
4 CH7 Analog Input Channel 7 25 CH0 Analog Input Channel 0
5 VREF Reference Voltage Input 24 AGND Analog Ground
6 DGND Digital Ground 23 AVDD Analog Supply Voltage
7 DB7/SO Data Bit 7 / Serial Out 22 /CS Chip Select (Active Low)
8 DB6/SI Data Bit 6 / Serial In 21 /RD/SCI Read Enable / Serial Clock Input
9 DB5/SHIFT Data Bit 5 / Shift Input 20 A0 Control Address Input
10 DB4/SCKO Data Bit 4 / Serial Clock Out 19 /WR/STB Write Enable / Strobe Input
11 DB3/SOEN Data Bit 3 / Serial Output Enable 18 MC Mode Select (High = Parallel Mode)
12 DB2/CODE Data Bit 2 / Code Output 17 CLK Clock Input
13 DB1/DEV1 Data Bit 1 / Device Select 1 16 EOC End Of Conversion (Active Low)
14 DB0/DEV0 Data Bit 0 / Device Select 0 15 DVDD Digital Power Supply (+5V)

Analog Input Channel Mapping

Because the ECU requires more analog inputs than the 8 native channels on the uPD7004C, Channel 7 is connected to an external Toshiba 8-channel analog multiplexer (MUX). This effectively expands the ECU's A/D capacity to 15 channels.

ADC Channel MUX Channel Target Sensor / Input Notes
0 - MAP (Manifold Absolute Pressure) Sensor Primary engine load calculation
1 - TPS (Throttle Position Sensor) Throttle angle feedback
2 - Alternator Voltage Feedback Monitored for idle & electrical load adjustments
3 - PA (Atmospheric Pressure) Sensor Barometric compensation (onboard ECU sensor)
4 - ECT (Engine Coolant Temperature) Sensor Coolant temperature fuel compensation
5 - IAT (Intake Air Temperature) Sensor Air temperature fuel density compensation
6 - EGR / Secondary O2 Sensor '89-91 JDM SiR: Secondary O2; '88-91 US Si/HF & '88-89 Teg: EGR lift sensor
7 0 Primary O2 (Oxygen) Sensor Closed-loop fueling feedback
7 1 Internal ADC Reference Diagnostic voltage check
7 2 Unused / Unknown -
7 3 Unused / Unknown -
7 4 Unused / Unknown -
7 5 Unused / Unknown -
7 6 ELD (Electric Load Detector) Electrical load signal from fuse box
7 7 ECU Connector Pin B18 Unused or optional accessory feedback

Datasheets

Credits and source

Authors blundar, l3st4rd, 1net

Source Adapted from UPD7004C on pgmfi.org wiki. Licensed under CC BY-NC-SA 1.0.

Attachments & Downloads

Size: 543.3 KB
SHA-256: f6aff21f...10820244