Understanding MCU Self Test

Thread Starter

bwilliams60

Joined Nov 18, 2012
1,442
Hello everyone. I work on a lot of automotive electronics and struggle to understand the MCU and its role in embedded technology. I have two questions:
1. How does a microcontroller send an instrument cluster for example, into its 3 second self test when it looks at all the warning lights and gauges etc. Is there a specific pin that this can be watched on?
2. Are there any good tutorials in laymans terms to walk one through understanding an MCU to a point where one can understand the steps that they go through in operation?
Thank you in advance.
 

Papabravo

Joined Feb 24, 2006
21,159
Hello everyone. I work on a lot of automotive electronics and struggle to understand the MCU and its role in embedded technology. I have two questions:
1. How does a microcontroller send an instrument cluster for example, into its 3 second self test when it looks at all the warning lights and gauges etc. Is there a specific pin that this can be watched on?
2. Are there any good tutorials in laymans terms to walk one through understanding an MCU to a point where one can understand the steps that they go through in operation?
Thank you in advance.
1. Each MCU is likely to be different when it comes to what you can "see" while it is in operation. Anything which could be considered, an output can be monitored. When I was doing this kind of stuff, I usually had an unused serial port that I used for testing and diagnostics. It would not surprise me if this thought had occurred to other smart engineers.
2. Good tutorials were not much of a thing when I got started. I did consume product datasheets and anything that was free from the manufacturers in industrial quantities. That all went pffft! in the late 90's, first with that stuff being put on CD's and then widely available on the internet.
 

Thread Starter

bwilliams60

Joined Nov 18, 2012
1,442
Thank you @Papabravo, as always you have great answers. I am thinking that there would be a specific pin that creates a ground circuit of sorts to temporarily complete all these circuits and then it is shut off again by the MCU. I was hoping it would be labelled somehow generically that one would be able to find it rather quickly but I guess there is no magic bullet. I am also not sure if there is a way to locate that said pin on the board somehow and maybe that is what I was looking for. The serial port seems the answer. Just looking for a quick way to locate that. I have a board that is slow to go into this mode so not sure where to start looking.
As for datasheets, I have dug through a lot of them but i find somewhere along the way I get totally lost on things that are assumed the reader knows and then I stop looking at the datasheet. i understand a lot of the functionality but would like to know more about what goes on in there, in laymans terms. I speak electronics but not fluently. Something like French :)
 

Papabravo

Joined Feb 24, 2006
21,159
A single bit control of all the indicators sounds like a simple concept, but in circuit terms would require a good deal of extra hardware. Most enterprises that I am familiar with would have taken a dim view of that since a processor could do all of that very quickly with a very minimal cost in terms of the total program memory required. The trends in processor power and the cost of program memory have been relentless increases in computation power and reduction in cost.

I was working at Ford Deaborn a long time ago (ca. 1995) and saw a pair of 4 x 8 sheets of plywood used to illustrate the difference in the wiring harness for a Lincoln with point-to-point wiring and one that used CAN. The reduction in wire volume (and cost) was dramatic. I can confidently state that on a vehicle with networks, a single point self-test would not be viable. This would be done by a series of messages sent on one or more networks to implement the feature.
 

BobTPH

Joined Jun 5, 2013
8,809
Think about how many pins would be needed for the micro to use one pin for each thing it monitors or controls. Cars use the CAN bus for most communication, not individual pins. That said, I do not know how the self test is initiated for the instrument panel on any car, but I would be surprised if it was a dedicated pin.
 

Thread Starter

bwilliams60

Joined Nov 18, 2012
1,442
I too had my eyes opened up by CAN when I worked for Navistar in 2003-2004 and this was introduced in our Heavy truck lines. The decrease in wiring bundles and harnesses was staggering and I understood the power of networking. This self-test has me scratching my head though as I wonder how it activates all of the warning lights at once, hold them on for a few seconds and then resumes normal operation. I know that all of these lights and gauges are then operated on an individual basis but how the initial power-up phase goes is a mystery to me. That is the part that I need explained. Gauge motors are driven by drivers which are sent messages by the MCU. That much I comprehend. I need to look further into the rest of it.
 

nsaspook

Joined Aug 27, 2009
13,080
Devices like the MC33996 or TIC12400 have test circuits and functionality that can used to check for the correct operation of inputs and outputs in a self-test function.
https://forum.allaboutcircuits.com/...2210-on-linux-with-libusb.179080/post-1644595

I created a MCP2210 DIO board for testing the Linux driver.
16 24vdc capable outputs (MC33996) and 24 24vdc capable inputs (TIC12400).
https://www.ti.com/lit/ds/symlink/t...48545&ref_url=https%3A%2F%2Fwww.google.com%2F
3 Description The TIC12400-Q1 is an advanced Multiple Switch Detection Interface (MSDI) designed to detect external switch status in a 12-V automotive system. The TIC12400-Q1 features an integrated 10-bit ADC to monitor multi-position analog switches and a comparator to monitor digital switches independently of the MCU. Detection thresholds can be programmed for the ADC and the comparator to support various switch topologies and system non-idealities. The device monitors 24 direct switch inputs, with 10 inputs configurable to monitor switches connected to either ground or battery. 6 unique wetting current settings can be programmed for each input to support different application scenarios. The device supports wake-up operation on all switch inputs to eliminate the need to keep the MCU active continuously, thus reducing power consumption of the system. The TIC12400-Q1 also offers integrated fault detection, ESD protection, and diagnostic functions for improved system robustness. The TIC12400-Q1 supports 2 modes of operations: continuous and polling mode. In continuous mode, wetting current is supplied continuously. In polling mode, wetting current is turned on periodically to sample the input status based on a programmable timer, thus the system power consumption is significantly reduced.
https://www.mouser.com/datasheet/2/302/MC33996-1126506.pdf
The 33996 is a 16-output low side switch with a 24-bit serial input control. It is designed for a variety of applications including inductive, incandescent, and LED loads. The Serial Peripheral Interface (SPI) provides both input control and diagnostic readout. A Pulse Width Modulation (PWM) control input is provided for pulse width modulation of multiple outputs at the same duty cycle. A dedicated reset input provides the ability to clear all internal registers and turn all outputs off. The 33996 directly interfaces with micro controllers and is compatible with both 3.3 and 5.0V CMOS logic levels. The 33996, in effect, serves as a bus expander and buffer with fault management features that reduce the MCU’s fault management burden.
 

Thread Starter

bwilliams60

Joined Nov 18, 2012
1,442
@nsaspook , you may have given me what I need to figure this out. This has an MC33889 on it that has a lot of functionality and there was some corrosion around the Rx/Tx from the micro pins. Perhaps there is more damage to the micro itself and I need to investigate more. I monitored the transmission lines with a scope but only had activity on one of those pins. Going to have a deeper dive on this. Perhaps the MCU instructs this device to carry out those functions? The MCU is a MC9S12DG256BVPV and looks to be functioning okay when it does work.
 
Top