circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 155 June 2003
E-Field Evalulation Module


A Z8-BASED E-FIELD EVM

Armed with a hardware reference design and four brand new MC33794 devices, I decided to build my own e-field EVM. Recently, I worked with the Zilog Z8 Encore! development kit and was impressed with the capabilities of the new microcontrollers (“Test-Driving the Z8,” Circuit Cellar 153). I decided to do an encore (pun intended) performance and bring in a Z8F6403 as the MC33794’s companion microcontroller.

My first hurdle to create my Z8 E-Field EVM was to develop a plan to successfully integrate the 5-VDC logic of the MC33794 with the 3.3-VDC logic of the Z8F6403. The Z8’s I/O is 5-V tolerant, which alleviates any problems with interfacing to the MC33794’s 5-V-based I/O. However, some of the MC33794’s analog outputs exceed the Z8’s 3-V ceiling for its ADC.

The PWR IN MON-to-PWR IN ratio is a nominal 0.2444 V/V and can range from a minimum of 0.2200 V/V to a maximum of 0.2688 V/V. My Z8-based EVM is powered by the 12-VDC portion of my standard PC power supply. Measuring the 12-VDC leg of my power supply at the input of the Z8-based EVM’s LM340 5-V regulator yielded 11.2 VDC. My 10-bit Z8 ADC registered 863 counts (2.53 V) with a 3.000-VDC reference. Using the Z8 ADC as the absolute reference puts the PWR IN MON-to-PWR IN ratio at 0.2257 V/V, which falls within the MC33794’s PWR IN MON-to-PWR IN V/V ratio window. That’s all good considering the possibility of error introduced by circuit loading from my bench equipment. The last time I checked my mailbox, I hadn’t received a multimillion dollar grant for lab-grade equipment from the National Science Foundation, but my measurements will stand considering I don’t use cheap test equipment.

The VDDMON-to-VDD ratio ranges from 0.45 to 0.55 V/V. You already know that the MC33794 supplies 8.5 VDC at the VDD output. With a typical 0.5-V/V ratio, that puts the VDDMON voltage above the 3-V range of the ADC. Because the MC33794’s VDD output voltage should remain fairly constant, I added a simple voltage divider to bring the voltage into the Z8 ADC’s measurement window. With the voltage divider active, my Z8-based EVM measured the VDDMON voltage at 748 clicks, or 2.19 V. The voltage divider accounted for half the voltage drop. So, 4.38 V should be present at the MC33794’s VDDMON pin. Again, without any equipment support from the National Science Foundation, I measured the voltage at the MC33794’s VDDMON pin at 4.30 V. A quick calculation put the VDDMON-to-VDD V/V ratio at 0.51, which is in line with the nominal VDDMON V/V measurement.

You’re probably wondering how I came about that ADC data. The Z8 development kit comes with tons of example code. One of the neat features of the Z8F6403 is its on-IC DMA engine. Using the DMA subsystem allowed me to do a continuous ADC conversion and, under interrupt control, put that ADC data into RAM for later retrieval by the main application. I simply used the DMA-ADC sample code that comes with the development kit as a basis for getting my Z8-based EVM readings out to a Tera Term Pro terminal session. The coding was dead easy because all I had to do was add a few lines of code to define the MC33794’s ABCD input-to-electrode mapping. Then, I added some VT-100 terminal commands to manipulate the Tera Term session, which was emulating a VT-100 terminal, and did some minor formatting using printf statements. I made all of my changes in the main.c module (see Listing 1).

Listing 1—Don’t try to run this code: it is a partial listing that should be regarded for example only. You can get the real thing from the Circuit Cellar ftp site. This example is intended to show you how little I had to do to get ADC clicks from the Z8-based EVM to the Tera Term Pro terminal session.

a)

b)

(Click here to enlarge)

Photo 5a—As you look at the top of my Z8 E-Field EVM, you can see the top jumper connects the external VREF to the Z8. The watchdog signal select jumper is just below the VREF jumper. Note the floppy drive power connector. b—You’ll find nothing unusual in my Z8-based EVM. I decided to mount the support components on this side of the board to free up as much space as possible for extending the Z8’s I/O and to provide as much heatsink and ground plane as I could on the other side of the board. Note the Ref A and Ref B capacitor positions are just to the upper right of the header.

Photo 5 shows the hardware I used to get the Z8’s ADC counts to the PC’s serial port. The power supply chain on my Z8-based EVM begins with an LM340S 5-V regulator, which feeds a Linear LT1086 3.3-V regulator. The National Semiconductor LM340S also feeds a stock National LM317LZ adjustable regulator circuit that is used to provide the 3.000-V reference for the Z8’s ADC subsystem. I opted not to use the MC33794’s on-IC 5-V regulator to supply the LT1086 because it can only supply a maximum of 75 mA. The Z8 runs at 18.432 MHz and can possibly draw a bit more than 75 mA by itself. Also, the LT1086’s heatsink tab is not connected to ground and is instead coupled to 3.3 VDC. I wanted to have plenty of ground plane area, which does double duty as a heatsink for the voltage regulators and the MC33794. To keep the Z8-based EVM as cool as possible and get as much ground plane area as I could, I decided to include the LM340S ahead of the LT1086.

The X-Tools package that comes with the development kit includes a good C compiler and an excellent debugger. Taking advantage of the IDE toolset required the addition of a 74LVTH125 tri-state buffer and a Sipex SP3243ECA RS-232 converter. The 74LVTH125 is used to implement the two-wire to one-wire debug interface between the C compiler/debugger and the Z8-based EVM. The RS-232 component of the debug interface is contained within the SP3243ECA. The SP3243ECA contains enough drivers and receivers to support both the Z8 debug interface and a standard three-wire RS-232 interface, which I used as the console port of the EVM. The inclusion of the debug and console interface hardware allowed me to use the C compiler and debugger without writing a single byte of Z8, debug, or RS-232 interface code. I now have the ability to access the Z8-based EVM hardware from the X-Tools IDE in the exact same manner as I access the Z8 development board. Note that the unused I/O pins are available at standard 0.1” header points on the EVM.

My finishing touch was adding a MC33794. The EVM schematic (see Figure 1) shows how to connect the MC33794’s analog outputs to the Z8’s ADC inputs. The necessary filter capacitors have been put into place per the schematic as well. The ground, shield driver, and MC33794 electrode access points are pinned out to a standard 0.1” header. Photo 5b shows the other side of the Z8-based EVM board and helps to associate the remainder of the physical components with their schematic counterparts.

(Click here to enlarge)

Figure 1—The hardware design allows you to purchase the inexpensive Z8 Encore! development kit and use the X-Tools Z8 C compiler and debugger to manipulate the resources on my Z8-based EVM.