AMC 68VZ328 software manual Available Digital I/O Pins

Page 66

Available Digital I/O Pins

The number of pins available for digital I/O depends on the other options compiled into the kernel. For example, if the EEPROM option is compiled in, then the bits from Port E bits[0-2] will not be available for digital I/O.

During boot up, devices that require pins for their dedicated functions will reserve them, and thus these pins cannot be accessed by the digital I/O character driver. After all other drivers have reserved their required pins, any remaining pins that have not been reserved will be used for digital I/O, and so a user-space program will be able to access these pins via the character device.

In order for the pins to be reserved, a scan of applicable devices is done on boot up. Thus, the same kernel can be used on any of the NETdimm, IOdimm, or CANdimm without having to recompile.

The pins are listed in Table 1 in their suggested order of use. The pins further down the list are more likely to be used for their dedicated functions than those at the top. Table 1 also describes the respective port and bit numbers of each class of pins, as well as their location on the backplane. Only the LCD class of I/O points and Port G/pin5 lead to pin headers on the backplane. The remaining pins must be accessed by soldering wires to the system or peripheral slot on the backplane. The following are notes regarding each class of pins.

The LCD class of pins are only used when an LCD display needs to be hooked up to the dimmPCI module. Thus, they are the least likely to be used for their dedicated function, and have the added advantage of leading to pin headers on the backplane.

The EEPROM class is only needed if an EEPROM is needed to store permanent information. This device is normally not populated on the dimmPCI modules, making it unlikely that the pins will be used for their dedicated function. Note that if the EEPROM is populated, those

pins cannot be used for digital I/O, even if the EEPROM driver has not been compiled in.

The SPI pins are used for peripheral interfaces such as an analog-to-digital converter. Note that the IOdimm has its own driver for the SPI pins in order to take care of its I/O functions. Thus, on an IOdimm the SPI pins will not be available for use by this digital I/O driver.

The ICE_DEBUG pins are the in-circuit debugger pins. These pins are more useful as outputs, since they must not be held low on power up. PortG/Pin5 is the EMU break, and access to this jumper pin is needed when running in rescue mode for ‘oops’. Also note that PortG/Pin2 is the EMU IRQ, which is a non-maskable interrupt.

66

www.amctechcorp.com

Image 66
Contents DimmPCITM 68VZ328 Hardware / Software Manual Copyright notice Contact InformationDimmPCITM 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 ArchitectureMCU Core System MemoryMemory 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 RS-232 WatchdogHighlights 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 Accessing the Network Static IPDynamic 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 Licensing, Copyrights & Liability DimmPCITM Software Development Kit DistributionPreamble 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