AMC 68VZ328 software manual + Κ

Page 94

As shipped, each ADC channel has a divide by 4 attenuator stage and a multiply by 2 amplifier stage. Thus for a signal applied to analog input pins on the backplane, a count of 4095 will correspond to a voltage of 8.192V.

For the DAC, analog output 0 has a multiply by 2 gain stage, so a count of 4095 corresponds to a voltage of 8.192V. Analog output 1 has a 4-20 current output circuit, with a count of 0 corresponding to approximately 3.5mA and 4095 corresponding to about 25mA.

Sample Programs

The sample program fir.c demonstrates the use of the ADC and DAC of the IOdimm. The digital I/O functions are demonstrated by the sample programs xor_iodimm.c and even_parity_iodimm.c.

fir.c will read analog input from a channel on the ADC. This input will be fed into a FIR filter, and then the output is written to the DAC. The source code for fir.c is available in /opt/samples/card_specific/

iodimm/fir.

There are 29 coefficients h(k) used to calculate the digital output values, y(n), given the digitised input x(n) using the summation

28

y(n) = h(k )x(n k )

k=0

The filter is prototyped using a Hamming window given N=29, the finite impulse response given by:

h(n) =

sin(0.33π (n 14))

n 

 

 

 

∗  0.54

0.46 cos2π

 



π (n

14)

28

 



Note that:

lim sin(kx) k

x0 x

as shown by the Taylor expansion of sine

sin(x) x

x3

+

x5

 

x7

+ Κ

 

 

 

 

 

7!

 

 

 

 

 

 

 

 

3!

5!

 

 

 

 

 

 

 

 

sin(kx)

kx

(kx)3

+

(kx)5

(kx)7

+ Κ

 

 

 

 

 

 

 

 

 

 

 

x

 

x

x 3!

x 5!

x 7!

 

 

 

 

 

94

www.amctechcorp.com

Image 94
Contents DimmPCITM 68VZ328 Hardware / Software Manual Contact Information Copyright noticeDimmPCITM Software Development Kit NETdimm Developers Kit Quick Start Guide Etc/issue Page This page left intentionally blank Introduction Launching Linux at the embeddedPage What’s on the CD? System RequirementsThis page left intentionally blank CPU Module FeaturesUC68VZ328 Embedded Microcontroller BackplaneGeneral Description CPU Module DescriptionBackplane Description Architecture CPU ArchitectureSystem Memory MCU CoreMemory Map Memory Memory MapLayout of the Flash and Flash Schematic Layout of the Flash Sdram Ethernet Controller Viewing the Ethernet MAC IDNETdimm Ethernet Schematic Digital I/O IOdimmDigital Output Schematic Analog Output Schematic Analog Input Schematic Digital to Analog Converter Schematic Watchdog RS-232Highlights Usage LCD Schematic LCD InterfaceDimmPCITM Signal Descriptions DimmPCITM signals for System SlotPCI Electrical Characteristics Maximum RatingsThis page left intentionally blank Builder Kit Installing the dimmPCI TM SystemInstallation Before beginningConfiguring and compiling the µClinux kernel Creating a ROM image Customizing the filesystemAccessing your dimmPCI development board via the serial port Static IP Accessing the NetworkDynamic IP Accessing your dimmPCI development board via telnet Compiling your own source codeUsing NFS to streamline the development cycle Home directory/dimmpci/source Updating Applications on your dimmPCI module MethodThis page left intentionally blank Programming the uC68VZ328 LoaderOops Cd /opt/boottools/oops Oops -p /dev/ttyS0 -k kernel.bin Page Page This page left intentionally blank Appendix Sample CodeClose the file afterwards fclose filehandle Page Longwatchdogid #include unistd.h #include stdio.h int main void This page left intentionally blank Journalling Flash File System Umount /usr Sbin/mkjffs /dev/flash0 Page This page left intentionally blank Development Tool Chains Normal Usage of the PIC-COFFTool Chain Page This page left intentionally blank D1 Application Note IntroductionKernel and Filesystem Configuration Kernel and Filesystem Configuration Flow Chart YESAvailable Digital I/O Pins List of all available digital I/O pins Programming Structure Dimmio structure descriptionDigital I/O Functions Page Sample Programs In0 In1 In2 In3 In4 In5 In6 In7 Out0 Even ParityMknod io1 c 123 Page This page left intentionally blank D2 Application Note AbstractKernel Configuration RequirementsAgain, from the main menu under Network device support Kernel Configuration Flow Chart AtCommandPrompt Filesystem Configuration Cd /opt/filesystem name make clean Make Filesystem Configuration Flow Chart Modifications to ‘rc’ fileHost machine Configuration TestingPage This page left intentionally blank Using Multiple NETdimm Modules Application NoteSimple Server & Client Inetd based Server & ClientPage This page left intentionally blank Using Analog and Digital I/O with IOdimmCd /opt Cp -Rpdx newfs iodimmmfs ADC MAX1203 Available I/O Pins Category Channel Backplane System Backplane Header Slot PinFunctions Digital Inputs and Outputs+ Κ Iodimm/dio Samples/cardspecific/iodimm/dio Page This page left intentionally blank Using Oops Purpose & basic format of files for oopsUpload & Flash Upload & Run DownloadCommon oops program arguments Appendix This page left intentionally blank 104 DimmPCITM Software Development Kit Distribution Licensing, Copyrights & LiabilityPreamble 106 107 108 109 No Warranty Appendix How to Apply These Terms to Your New Programs111 112 113 This page left intentionally blank 114 References/ Suggested Reading