Home

Microprocessors Lab Manual

image

Contents

1. operation of such components 1 e if the component is not installed Output LED control GPBHE High byte D15 D8 data enable of the 16 bit data bus GPCSO General purpose chip select for 16 bit I O operation Input STEP2 jumper 3 5 2 J4 Connector for ADC DAC PITO 4 TINO TINI 10 SSI 12 VB 14 ANI 16 AN3 4 VCC ADS 18 ANS 20 AN gt 6 8 SSC 22 AN9 26 6 c n ANO 13 AN2 15 ANA 17 AN6 19 ANS 21 REF REF 3 x 25 lt gt PITG2 1 TOUTO 3 TOUTI 5 SSO 7 ANIO 9 Figure 3 4 J4 connector Do al A TENA Data bus control bus MMA MotionC PIO UART Pins 38 40 Step2 jumper ADC DAC SC520 Timers ADC DAC 49 Microprocessors Lab Manual Figure 3 3 Pin 1 locations for J2 and J1 Ji signal Name VOC MPO 50 Microprocessors Lab Manual 51
2. PIO 2 26 and PIO 28 29 30 as output pio init 0 2 PIO O LED as output for 1 2 1 lt 27 1 f pio init 1 2 PIO 2 26 as output pio init 28 2 PIO 28 as output pio init 29 2 PIO 29 as output pio init 30 2 PIO 30 as output ledd 0 while 1 pio_wr 0 ledd led on main board PIO 0 for i 23i lt 27 i pio wr 1 ledd PIO 2 26 as output pio wr 28 ledd P28 pio_wr 29 ledd P29 pio wr 30 ledd P30 pio wr 2 ledd P2 gt gt gt Relay ledd ledd delay ms 1000 j Compile the project built then run the project 2 4 Check all the pins from P2 P27 P29 and P30 on the training board then on the logic analyzer 2 5 Update the above C program to generate a 3 second ON then 3 second OFF flashing patterns using P4 till P7 that must connected to board s LEDs or the logic analyzer and oscilloscope Here repeat the delay statement seven times to get a square wave of 6 120 second period 42 Microprocessors Lab Manual 2 6 Write a program that generates 20 ms square wave using P10 and show your output on the oscilloscope 2 7 Connect P10 P11 to LEDs on the training board or your logic analyzer and P12 P13 to the switched and then develop a program that reads from the input switch and displays on the LEDs The inputting program as follow include 586 h 586E initialization unsigned integer a b void main void sc_init 586E initialization p
3. lines PIO that can be used as general I O or other functions Two supervisor chips monitor 5V and 3 3V and provide power failure detection watchdog and system reset The 2 5V is used for the SC520 core and 3 3V for the I O operation Signal lines on headers are 3 3V output and 5V maximum input All components are soldered on board for highest reliability The 586 Engine TM can be powered with a single regulated 5V with the on board 3 3V and 2 5V regulators It also can be powered by external regulated 5V 3 3V and 2 5V A total of 19 analog inputs are supported with a serial ADC TLC2543 11 inputs 20KHz sample rate 12 bit 0 REF and a parallel ADC AD7852 8 inputs 100KHz sample rate 12 bit 0 5V Two serial DACs LTC1446 2 channels 0 4 095V and a parallel 12 bit DAC DA7625 4 channels 0 2 5V can be in stalled to provide a total of 8 analog outputs The 586 Engine shares a similar pin out and physical dimensions with the 1386 Engine A Engine and V25 Engine LM As compared to these other engine based controllers the 5E offers substantially more computing power at greater per unit costs and power requirements The EZ 586 Tutor PIO pins are 3 3V output and all inputs are 5V tolerate Absolutely no voltage above the 5 volt should be applied to any pins Over 5 volt can cause a permanent damage Pins PO P1 P27 and P31 are free to use A P10 line can be configured to operate as an output or an input with a weak internal pull up resist
4. 86 h 586 initialization unsigned char ledd unsigned int i k void main void sc_init 586 ledd 0 k 30000 39 Microprocessors Lab Manual while 1 1 led ledd Directive led 0 1 ledd ledd gt gt complement for i 0 i lt k it ledd ledd wasting time or delay delay ms1 10 or you can use delay ms 1000 1 8 After Downloading is completed the Debug Window will appear And Click on View gt then select Target Peripherals you wish to view Then you can debug as usual like Single stepping Setting breakpoint Paradigm C TERN Edition led File Edit Search View Project ae Tool Debug Options Window Help EE mese f Attis 2 2 2 2 4 4 4 4 4 44 2 2 2 2 led c Test LED Turn LED on i AAA AA AAA AAA AAA AAA AAA AA AAA include ie h Y char ledd unsigned int i k 0800 00 9 mov bp p d tern 386 saaples ie led c 11 ie i 0800 00AB call ie init d tern 386 saaples ie led c 12 ledd 0800 00 E mov byte ptr _ledd 0x00 d tern 386 saraples ie led c 13 k 30 0800 00B3 mov word ptr k 0x7530 d tern 386 saaples ie led c 15 led 0800 00B9 mov al ledd 0800 00BC cbw 0800 00BD push ax 0800 00BE call _led void main void 7246 Fr 0100 0474 0800 0100 0478 0049 ie init 38 Todd 0800 00C1 pop cx 0100 0476 0002 T d 0100 0000 MMM 00 00 00 4E 55 4C 4c NUI Br whil
5. EZ 586 Tutor LD3 turn on indicating that the selected PC s COM port is active 1 2 Make sure SW1 all switches are set to off position on the EZ 586 Tutor 1 3 Make sure that the step 2 Jumper is connected to J1 pins 38 40 on the tutor in order to enable you to download the written program from the PC to the EZ tutor 1 4 Connect the wall transformer 9VDC to J1 of the EZ 586 Tutor LD1 turn on indicating that the board is powered up LD2 and LDS also turn on Here look at L1 at the 586 engine it will blink twice then stays on this indicate that the board 1s ready to download programs 1 5 Open the Paradigm C C software and if there is any existing project gt Click on Project Close project then Click on Project Open project Browse the project C Tern 586 led ide and click OK Note that the directory C or D will depend on your installation Open Project File 2 xl File Name Directories v dMem386 iem led ide E d E gt TERN f 386 G config E3 include lib Viewer Drives Detaut Viewer d DATA Network List Files of Type Project files ide prj Y 37 Microprocessors Lab Manual 1 6 You can see the following screen Paradigm C TERN Edition led File Edit Search View Project Script Tool Debug Options Window Help l D TERN 386 SAMPLES IE LED C fA dds9dds4dsdddsddsddsddksdkbstdktsddksdkbstddsiss ss led c Test LED 04 07 1998 i Turn LED on a
6. Microprocessors Lab Manual 6 Introduction to 586 Engine and PIO 1 Introduction The objectives of this lab are A To get the students familiar with the SC 586 microprocessor developing board B To teach the students how to program a general input output GPIO and how to write read the digital signals 2 Theory 586 Engine is a high performance 32 bit 586 CPU with Floating Point Unit FPU ADC DAC UARTS with the following specifications e Measures 3 6x2 3x0 3 inches e 32 bit CPU AMD SC520 x86 compatible e 100 133 MHz system clock e High performance hardware floating point coprocessor e Power consumption 440 mA at 5V e Temperature 40 to 80 Celsius e Upto 512 KB Flash EPROM e Upto 512 KB battery backed SRAM e 114 byte internal RAM e 32 PIOs e 7 timers e 15 interrupts e One synchronous serial port three UARTS e 19 channels 12 bit ADC e Schannels 12 bit DAC e Real time lock battery The 586 Engine TM SE is a C C programmable controller based on a 32 bit 100 133 MHz AMD Elan SC520 The SC520 integrates an Am586 CPU and a high performance ANSVIEEE 754 compliant 64 bit hardware floating point unit FPU It is designed for embedded systems that require high performance PC compatibility compactness and high reliability at a low cost Whether you use it as the processor core component of an OEM product as part of a smart sensor or as a node in a distributed microprocessor system building your
7. V An optional 12 bit serial ADC P2543 has 11 channels of analog inputs with sample and hold and a 5V reference that facilitate ratiometric conversion scaling and isolation of analog circuitry from logic and supply noise supporting conversion up to a sample rate of approximately 10 KHz Up to two optional 2 channel 12 bit serial DAC LT1446 that provides 0 4 095V analog voltage outputs capable of sinking or sourcing 5mA is also available Overall the E can support up to 8 analog outputs and 19 analog inputs 1 2 Features e Dimensions 3 6 x 2 3 x 0 3 inches e Temperature 40 C to 80 C e 133MHz 32 bit CPU ElanSC520 AMD Intel 80x86 compatible e Easy to program in C C e Power consumption 440 mA at 5V e Power input 5V regulated DC or 9V to 12V unregulated DC with P100 expansion board installed e 512 KB SRAM 512 KB 114 byte internal RAM e 8 channel 300 KHz parallel 12 bit ADC AD7852 with 0 5V analog input e 4 channel 200 KHz parallel 12 bit DAC DA7625 with 0 2 5V analog output e 2 channels serial 12 bit DAC LT1446 10 KHz e 11 channels serial 12 bit ADC P2543 10 KHz e high performance floating point coprocessor e Up to IGB memory expansion via MemCard A e Up to 3 serial ports 2 from ElanSC520 plus one optional SCC2691 UART support 8 bit or 9 bit asynchronous communication 46 Microprocessors Lab Manual e 15 external interrupts with programmable priority e 32 multifunctional I O li
8. e 1 0100 0472 0100 0100 0008 20 43 48 45 43 4B DO 00 CHECK 0100 0472 0100 0100 0010 00 00 00 00 00 00 00 DD once intefg master icwl socio synch ssiotbuf 0000 ssiorbuf 0000 wdtentl ESIE icw2 ssiobaud 00 wdtclr icw3 wdtstatus t icw4 ssiocon co ssiocon2 Co ssioctr 00 com1 rbr Pa tbr0 iai a a REM PORE ee js icr ocw1 EF imr EF ocw2 ocw3 it i Microprocessors Lab Manual 2 Building GPIO project 2 Repeat all the above procedures 2 2 Copy and past the project led ide to a LAB1 gio ide LAB1 demo and LABI input 3 Open the labl demo ide project again after closing all the opened projects then try to delete the program led c and load instate of it 586 pio c then save the project 4 Connect J2 with a 40 pins flat IDE cable to the ETS 7000 Digital training kit via the 60 pin adapter 5 Check the data sheet for J2 connection 6 The program 586 pio c is as follow JA TE ap s ale sk sk ae ae ale i sk sie oe ie ale ak ale oe oe le ale ale ak oe oie ale ak sk oe oe le ale ale ok ae oe ale ak ok a oe le oe ale al oe oe ale ale ale a fe le ale ae ale akk akk ale ale aK ie fe ie 2 2 586 pio c 10 13 2000 SC520 has 32 Programmable I O pins PIO 0 31 Each can be programmed as a PIO function or Interface function See SC520 User s Manual on the CD Table 23 1 for details sc_init initialize after power on a
9. etic instructions to handle various numeric data types and formats and transcendental functions for sine cosine tangent logarithms etc useful for intensive computational applications Special Note The core of the Am520 CPU operates at 2 5V and the I O operation at 3 3V Also the input for the I O is 5V compatible Stresses above these can cause permanent damage to the SC520 CPU Operation above these values is not recommended and can effect device reliability 586 Engine SCC2691 SRM UART us 512 KB 16 bit U9 Am5x86 FLASH CPU watchdog 512 KB 16 bit U1 m enable 100 133MHz 8ch 12 bit ADC AD7852 u12 11 ch 12 bit ER ADC P2543 u14 16 Bit Timers 7 Ext Interrupts 15 32 VO lines RTC CMOS RAM ROM Flash Cont 4 ch 12 bit 2 16550 UARTs DAC DA7625 SSI Watchdog Timer Interupt Controller U11 Functional block diagram of the 586 Engine The 586 Engine boots up from on board 512KB ACTF Flash and supports up to 512KB battery backed SRAM No SDRAM PCI or DMA supported The on board Flash has a protected boot 45 Microprocessors Lab Manual loader and can be easily programmed in the field via serial link Users can download a kernel into the Flash for remote debugging With the DV and ACTF Flash Kit support user application codes can be easily field programmed into and run out of the Flash A real time clock RTC72423 provides information on the year month date hour minute and second in addit
10. io init 12 2 Pin 12 as output pio init 10 1 Pin 10 as input pio init 13 2 Pin 13 as output pio init 11 1 Pin 11 as input while 1 a pio rd 0 read from 0 15 the lower sixteen if a amp 0x0400 pio wr 12 1 else pio wr 12 0 if a amp 0800 pio wr 13 1 else pio wr 13 0 5 Questions Do all the procedures steps very carefully and show all your results to the instructor 43 Microprocessors Lab Manual 6 Appendixes Bunn m www advancedmsinc com www tern com www testech elect com tern http www edaboard com forums html Delay Time Frequency Counts ms Hz 25 20 50 50 40 24 100 80 12 200 160 6 300 240 4 2 400 320 3 12 500 400 2 5 600 480 2 800 640 1 5 1000 800 1 25 44 Microprocessors Lab Manual 586 Functional Description Measuring 3 6 x 2 3 x 0 3 inches the 586 Engine 5E is a C C programmable microprocessor module based on a 100 133 MHz 32 bit CPU ElanSC520 AMD Features such as its low cost compact size surface mount flash high performance floating point coprocessor and reliability make the SE ideal for industrial process control and applications requiring intensive mathematical computation It is designed for embedded applications that require compactness and high reliability The 586 Engine 5E integrates an Am586 CPU and high performance ANSVIEEE 754 compliant hardware floating point unit FPU It provides arithm
11. ion to a 100 year calender and 114 bytes of general purpose battery backed RAM This RAM is used by the real time clock as well as the ACTF to store the jump address as the pointer to the users application code Two industy standard UARTS support high speed reliable serial communication at a rate of up to 1 152 M baud via RS 232 drivers One synchronous serial interface SST supports full duplex bi directional communication An optional UART SCC2691 may be added in order to have a third UART on board All three serial ports support 8 bit and 9 bit communication There is one programmable interval timer PIT providing 3 16 bit PIT timers and 3 16 bit GP timers and a software timer The timers support timing or counting external events The software timer provides a very efficient hardware timebase with microsecond resolution In addition there are two supervisor chips that monitor for power failure watchdog and system reset The 586 Engine provides 32 user programmable multifunctional I O pins from the CPU Most of the PIO lines share pins with other functions The 586E supports up to 15 external interrupts No repair support is available for the 388 pin BGA SC520 A high speed up to 300K samples per second 8 channel 12 bit parallel ADC AD7852 can be installed This ADC includes sample and hold and precision internal reference and has an input range of 0 5 V The 586 Engine also supports a 4 channel high speed parallel DAC DA7625 0 2 5
12. low 47 Microprocessors Lab Manual These configurations as well as the processor internal peripheral usage configurations are listed below in next Table mo rene rmn eere Dien GPALE Input with pull up LEDLI pin 2 Output for LED control GPBHE Input with pull up J1 pin 11 High byte enable BHE GPRDY Input with pull up J2 pin 4 Input with pull up GPAEN Input with pull up J2 pin 1 Input with pull up GPTC Input with pull up J2 pin 3 Input with pull up GPDRQ3 Input with pull down J2 pin 5 Input with pull down GPDRQ2 Input with pull down J2 pin 7 Input with pull down GPDRQ1 Input with pull down J2 pin 10 Input with pull down GPDRQO Input with pull down J2 pin 9 Input with pull down IGPDACK3 Input with pull up J2 pin 12 Input with pull up GPDACK2 Input with pull up J2 pin 11 Input with pull up GPDACKI Input with pull up J2 pin 14 Input with pull up GPDACKO Input with pull up J2 pin 13 Input with pull up GPIRQ10 Input with pull up J2 pin 8 Input with pull up GPIRQ9 Input with pull up J2 pin 6 Input with pull up GPIRQS Input with pull up J2 pin 16 Input with pull up GPIRQ7 Input with pull up Ji pin 15 Input with pull up GPIRQ6 Input with pull up J2 pin 18 Input with pull up GPIRQ5 Input with pull up J2 pin 17 Input with pull up GPIRO4 Input with pull up J2 pin 20 Input with pull up GPIRQ3 Input with pull up J2 pin 19 Input with pull up GPIRQ2 Input with pull up J2 pin 21 Input with pull up GPIRQ1 Input with pull up J2 pin 23 Input
13. nd off with T5 i B is led rom rom FAAAAAAAAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AH D libvie lib lib 386 initialization D samples ie led c c lines 2 8 D readme txt txt include ie h char ledd unsigned int i k void main vold ie init 386 initialization ledd 0 k 30000 while 1 led ledd ledd ledd for i 0 i lt k i uldime f Runtime a ime ham rt F x 1 7 Power On the 586 board Build the project by pressing F9 or Click Project gt Make All Then Double Click on the led axe and it will download led axe to the Tern 586 board Project d tern 386 led ide Ev led axe axe PDREMOTE ROM B config 386 cfg cfg e o led rom rom Bb libNie 1lib lib Ep samples ie led c c lines Dp readme txt txt Microprocessors Lab Manual This is the download page xi Statistics Bytes sent 3600 Total size 4608 Warnings 0 File download 78 complete And this is the program FE TR ae ale oi sk sie ae le ale ak sk oe ae ale ale ale ak ae ak ale ak ak ae oe ale ale ale oie ae le ale ak ak oe oie ale ale ale a ae le ale ak ak ae oe ale ale ale oe fe le ale ak ak fe le ale 2 ale ae akk ale ak ak led c Test LED on 586 Engine 10 13 2000 Turn LED on and off with PIO 0 ololelokolokeloteleleleleleleleleteleteleloleleleleteleteleleleteleleteleteleteleteleleteleleletoletereleteleteletejeleteteteletelelelek include 5
14. nes from ElanSC520 1 SSI 7 16 bit timers e 114 bytes internal battery backed RAM Supervisor 691 for power failure reset and watchdog e Real time clock RTC72423 lithium coin battery e P100 I O expansion board for regulated 5V power RS 232 485 drivers and TTL I O lines optional Physical Description The physical layout of the 586 Engine is shown below Physical layout of the 586 Engine SC520 PIOs The SC520 supports 32 user programmable I O lines PIO Each of these pins can be used as a user programmable input or output signal if the interface function is not needed The 586 Engine PIO pins are 3 3V output and all inputs are 5V tolerant Absolutely no voltage greater than 5V should be applied to any pins Over 5V voltage input can cause permanent damage After power on reset PIO pins default to various configurations The initialization routine sc init provided by TERN libraries reconfigures some of these pins as needed as P27 GPCS0 J2 37 for 16 bit I O operation of on board ADC DAC P31 J2 38 as input for STEP2 jumper reading PO as output for on board LED control P1 GPBHE J1 11 as BHE for 16 bit data bus high byte enable signal Other 28 PIO pins on the J2 header are free to use PIO 2 26 and PIO 28 29 30 A PIO line can be configured to operate as a output or an input with a weak internal pull up or pull down resistor A PIO pin s behavior either pull up or pull down is pre determined and shown in the table be
15. or Paradigm C is a complete Integrated Development Environment IDE for developing real and protected mode x86 embedded system applications The integrated source level debugger for all the Intel 186 and 386 microprocessors supports stand alone debugging or can be used as a front end for popular in circuit emulators from Applied Microsystems and others Paradigm C shares a common user interface with full support for source level debugging of embedded C C applications Featuring watches inspectors and a variety of memory I O and real time operating system viewers Paradigm C provides a high level of control and visibility of the target system When necessary the ability to drop down to a low level CPU or memory view is always available Paradigm C includes the Paradigm PDREMOTE ROM debugging kernel ready to be customized for your unique target system Customized versions of Paradigm C add support for hardware breakpoints real time trace overlay memory and other custom hardware found in popular in circuit emulators 36 Microprocessors Lab Manual 3 Equipment Used v EZ 586 Tutor from AMS that contains a 586 5E controller from Tern Note that PIO 6 7 8 and 9 are not working Paradigm C C Software Digital training kit ETS 7000 Oscilloscope Logic analyzer VVV V 4 Procedures 1 Demonstrating the hardware and software 1 1 Connect the DB9 connector from COMI or COM2 of the PC s ports to J3 on
16. product around the 5E will reduce development time and costs minimize technical risks and allow you to deliver a more reliable end product The FPU provides arithmetic instructions to handle numeric data and transcendental functions for sine tangent logarithms etc making this controller useful for intensive computational applications It is estimated to be 10 50 times faster than software emulate on an 8 16 bit controller without a FPU 35 Microprocessors Lab Manual The 586 Engine supports up to 15 external interrupts There are a total of seven timers including one programmable interval timer PIT that provides three 16 bit PIT timers and three 16 bit GP timers plus a software timer These timers can support timing or counting external events The software timer provides a very efficient hardware time base with microsecond resolution A real time clock RTC provides time of day 100 year calendar and 114 bytes of battery backed RAM Two industrial standard 16550 compatible UARTs support baud rates up to 1 152 M baud One synchronous serial interface SSI supports full duplex bi directional communication One additional optional UART SCC2691 can be installed The 586 Engine TM boots from on board 256K 16 bit ACTF Flash and supports up to 256K 16 bit battery backed SRAM SDRAM and DMA are not supported Up to 1GB memory expansion can be added with MemCard A and PCMCIA ATA Flash cards There are 32 programmable multifunctional I O
17. s P27 GPCS0 J2 37 for 16 bit I O operation of on board ADC DAC P31 J2 38 as input for STEP2 jumper reading PO as output for on board LED control P1 GPBHE J1 11 as BHE for 16 bit data bus high byte enable signal Other 28 PIO pins on the J2 header are free to use PIO 2 26 and PIO 28 29 30 Functions for port I O pins void pio init char bit char mode where bit 0 31 mode 0 Interface operation mode 1 Input with pullup down mode 2 Output void pio wr char bit char dat where bit 0 31 address the PIO 0 31 pins dat 0 1 controls voltage low high unsigned int pio rd char port return status on PIO 15 PIO 0 if port 0 return status on PIO 16 PIO 31 if port 1 You can also direct write 16 bit to the PIO register as below poke MMCR PIOSETIS 0 m to set PIO 15 0 output pins high poke MMCR PIOCLRIS 0 m to set PIO 15 0 output pins low 41 Microprocessors Lab Manual poke MMCR PIOSET31 16 m to set PIO 31 16 output pins high poke MMCR PIOCLR31 16 m to set PIO 31 16 output pins low JA 9 E ale sk sk se ae ale oi sk ak oe ie ale ak sk oie oe le ale sk ak ae ak ale ak ak ak oe le ale ale ok ae oe ak ak ok sie oe le o ae Die oe oe ak ak sk 3k fe ie eoe oko akk akk ale ale 3K ae fe ale include 586 h 586E initialization unsigned char 1 ledd void main void sc_init 586E initialization Setup PIO 0 LED
18. with pull up GPIRQO Input with pull up J2 pin 33 Input with pull up GPBUFOE Input with pull up J2 pin 24 Input with pull up GPIOCS16 Input with pull up J2 pin 25 Input with pull up GPMCS16 Input with pull up J2 pin 29 Input with pull up GPCSO Input with pull up J2 pin 37 16 bit I O operation CTS2 Input with pull up J2 pin 36 Input with pull up DSR2 Input with pull up J2 pin 35 Input with pull up DCD2 Input with pull up J2 pin 30 Input with pull up RIN2 Input with pull up J2 pin 38 I O pin default configuration after power on or reset C function in the library 586 lib can be used to initialize and to operate PIO pins void pio init char bit char mode Where bit 0 31 and mode 0 for interface function 1 for input or 2 for output Example pio init 31 2 will set P31 as output pio init 1 0 will set Pl as GPBHE 48 Microprocessors Lab Manual vold pio wr char bit char dat pio wr 31 1 set P31 pin high and the LED is off if P31 is in output mode pio wr 31 0 set P31 pin low and the LED is on if P31 is in output mode unsigned int pio rd char port pio rd 0 return 16 bit status of PO P15 if corresponding pin is in input mode pio rd 1 return 16 bit status of P16 P31 if corresponding pin is in input mode Some of the I O lines are used by the 586 Engine system for on board components Table 3 2 We suggest that you not use these lines unless you are sure that you are not interfering with the

Download Pdf Manuals

image

Related Search

Related Contents

Nady Systems Microphone rsm-2 User's Manual  Sony CDX-S2250EE User's Manual  Chief NAID1BA rack accessory  .print Desktop Engine (English)  PACS Photometry observing strategies - Herschel  

Copyright © All rights reserved.
Failed to retrieve file