also the schematic your telling is not given but the controller that im using is this www.e-gizmo.com/KIT/Z8duino.htm
a z80402A with an arduino hardware pin layout.
and i want to display the measured distance to 7 segments.. thats what im thinking about.l
Re:Distance Measurement using ZIlog 2 Months, 3 Weeks ago
Karma: 0
Fortunately I had a 28-pin version of Z8F1680 microcontroller (upper-comatible with a Z8F042A) in my parts box, so I bought some other missing parts in Akihabara on the returning way of business meeting in Tokyo yesterday.
I think you wish to implement an circuit like the following, right?
Four 7-segment LED has 28 (or 32, including periods) elements, but there aren't so much of remaining pins on your processor. The four-digit LED shown in the video is prewired and molded in a single package, but is equivalent to four ordinary 7-segment LEDs. It's not an intelligent module that can handle multi-digit decimals or alphabets.
The circuit shown in the video performs dynamic displaying. Four digits are lit one after another in rapid-fire (not simultaneously).
To drive LEDs, I recommend to use PORT C since the port can directly drive LEDs without any external resistor.
Let's start from single digit. Connect A, B, ... , G, DP to PORTC0, C1, ... , C6, C7, respectively. Also connect common anode to Vcc (3.3V) in this time.
Re:Distance Measurement using ZIlog 2 Months, 3 Weeks ago
Karma: 0
Dear graceshin00:
Yes. We can verify whether the code can be successfully compiled, but you are only the person that can run on the real hardware. Hope that you can obtain an anode-common 7-segment LEDs somewhere and succeed to display '2' on the LED. I'm waiting for your next report.
The sensor has three types of outputs: UART, Analog Voltage, and Pulse Width. I'd like to use analog output in the beginning because it enables us to talk about the mesurement without knowing the clock speed of your board, but the ADC results of Z8F1680 are not stable on my testboard.
Then I tried to measure the pulse width. I can show both ways for you: (1) software loop, and (2) utilizing gated mode of a timer module.