LPC 2378 Development Board

March 23, 2018 | Author: Dinesh Kumar | Category: Usb, Arm Architecture, Ethernet, Digital To Analog Converter, Instruction Set


Comments



Description

ViARM-2378 DEVELOPMENT BOARDCHAPTER – 1 INTRODUCTION The ViARM-2378 Development System is a full featured Development Board for ARM-7 Core NXP LPC2378 ARM Processor. It has been designed to allow students and engineers to easily exercise and explore the capabilities of ARM-7 Core. It allows LPC2378 ARM Processor to be interfaced with external Circuits and a broad range of peripheral devices, allowing a user to concentrate on Software Development. The LPC2378 Micro-controller is based on a 32/16 Bit ARM7TDMI-s CPU with real time Emulation and Embedded Trace support that combines with the microcontroller with embedded high-speed 512KB flash memory. It can work with 16-bit Thumb Mode. With Useful Implemented peripherals, plentiful practical code examples and a broad set of additional on board Peripherals (10/100Mbps Ethernet, MMC/SD, ADC, DAC, RTC, USB etc.,). ViARM Development boards make fast and reliable tools that can satisfy the needs of experienced engineers and beginners alike. ViARM-2378 Development Boards achieve their small size through Modern SMD technology and Multi layer Design. All Controller signals and ports extend from the controller to high-density pitch Connectors of the board. ViARM-2378 Hardware Manual Describes the board’s design and functions and also includes the Circuit Diagrams and Component Layout. Vi Microsystems Pvt. Ltd., [1] ViARM-2378 DEVELOPMENT BOARD ViARM-2378 DEVELOPMENT BOARD Vi Microsystems Pvt. Ltd., [2] ViARM-2378 DEVELOPMENT BOARD ViARM-2378 Development Board Parts Details 1. NXP LPC2378 Micro controller (TQFP-144 Packaging). 2. Power supply section. 3. UART. 4. CAN Port. 5. Stepper Motor. 6. Relay. 7. USB 2.0 Device Connector. 8. 10/100 Base T Ethernet Connector. 9. PS2- Keyboard connector. 10. Stereo Jack for USB Audio Device. 11. Prog/Exec Switch. 12. Joystick. 13. TFT LCD. 14. 4 x 4 Matrix Keypad. 15. 8 Way DIP switch. 16. LED. 17. SD Card Socket. 18. Analog input Trimmer. 19. 128 x 64 Pixels Graphics LCD. 20. Jtag Connector. 21. ADC, DAC and PWM Expansion slot. 22. 50Pin Expansion Header. 23. J-Trace. 24. Seven Segment Display. 25. Serial EEPROM. 26. Speaker. 27. Temperature Sensor. Vi Microsystems Pvt. Ltd., [3] LPC-2378 is an ARM-based microcontroller for applications requiring serial communications for a variety of purposes. two CAN channels.. supporting up to 32 vectored interrupts. the I2S port. Flash program memory is on the ARM local bus for high performance CPU access. Single Flash sector or full chip erase in 400ms and 256 bytes programming in 1ms.. USB DMA. This microcontroller incorporate a 10/100 Ethernet MAC. and the SD/MMC card port. * 16KB Static RAM for Ethernet interface. * External memory controller that supports static devices such as Flash and SRAM. * Up to 32KB of SRAM on the ARM local bus for high performance CPU access. Vi Microsystems Pvt.0 Full Speed interface. running at up to 72 MHz. * 8KB Static RAM for USB interface. Ltd. [4] . as well as for memory-to-memory transfers. Features * ARM7TDMI-S processor. * General Purpose AHB DMA controller (GPDMA) that can be used with the SSP serial interfaces. Can also be used as general purpose SRAM. Can also be used as general purpose SRAM.. It has 8-bit data/16-bit address parallel bus is available. USB 2. * Dual AHB system that provides for simultaneous Ethernet DMA. * Up to 512kB on-chip Flash Program Memory with In-System Programming (ISP) and In-Application Programming (IAP) capabilities. and a Mini Bus. * Advanced Vectored Interrupt Controller. A bus bridge allows the Ethernet DMA to access the other AHB subsystem. an I2S interface. two Synchronous Serial Ports (SSP). and program execution from on-chip Flash with no contention between those functions. three I2C interfaces. four UARTs.ViARM-2378 DEVELOPMENT BOARD About LPC2378 CPU. an SPI interface. 0 Device with on-chip PHY and associated DMA controller.ViARM-2378 DEVELOPMENT BOARD * Serial Interfaces: . sharing its interrupt and pins. . The second and third I2C interfaces are expansion I2Cs with standard port pins rather than special open drain I2C pins. The SSP controllers can be used. Vi Microsystems Pvt. The I2S interface can be used with the GPDMA. all with FIFO.Three I2C Interfaces reside on the APB bus.. one with IrDA support. . [5] .I2S (Inter-IC Sound) interface for digital audio input or output.10 bit D/A converter.USB 2. .Two CAN channels with Acceptance Filter/Full CAN mode reside on the APB bus.Four UARTs with fractional baud rate generation. Each Timer block has an external count input. . These reside on the APB bus.10 bit A/D converter with input multiplexing among 8-pins.Up to 104 general-purpose I/O pins. . . These functions reside on an independent AHB bus.Secure Digital (SD) / Multi-Media Card (MMC) memory card interface.Two SSP controllers with FIFO and multi-protocol capabilities. residing on the APB bus. one with modem control I/O.Four general purpose Timers with two capture inputs each and up to four compare output pins each. One is an alternate for the SPI port. . Ltd. * Other APB Peripherals: . . . residing on the APB bus.Ethernet MAC with associated DMA controller. . - SPI controller. tuning of power consumption based on needed features. and Deep Power down. Sleep. * Standard ARM Test/Debug interface for compatibility with existing tools. or the APB clock.Watchdog Timer. * Single 3. Vi Microsystems Pvt. * On-chip crystal oscillator with an operating range of 1MHz to 24MHz. clock source can be the RTC oscillator or the APB clock.2KB Static RAM powered from the RTC power pin. The PWM has two external count inputs. . * Support for real-time trace. * On-chip Power on Reset. * Two independent power domains allow fine.6V). allowing data to be stored when the rest of the chip is powered off. the RTC oscillator. . [6] . * Four reduced power modes: Idle.3V power supply (3. The watchdog timer can be clocked from the internal RC oscillator. and Ethernet wakeup Interrupt).Real Time Clock with separate power pin. In addition every PORT0/2 pin can be configured as an edge sensing interrupt.One PWM/Timer block with support for 3 phase motor control. .. * Four external interrupt inputs. RTC interrupt.0V to 3. * Processor wakeup from Power Down mode via any interrupt able to operate during Power Down mode (includes external interrupts. Ltd. * Emulation Trace Module. Power Down. * Brown out detect with separate thresholds for interrupt and forced reset.ViARM-2378 DEVELOPMENT BOARD . * On-chip PLL allows CPU operation up to the maximum CPU rate without the need for a high frequency crystal. the internal RC oscillator. May be run from the main oscillator.. an external clock source is suggested to be used. AHB peripherals are allocated a 2MB range of addresses at the very top of the 4GB ARM memory space. Vi Microsystems Pvt.5GB address point. Lower speed peripheral functions are connected to the APB bus.ViARM-2378 DEVELOPMENT BOARD * 4 MHz internal RC oscillator that can optionally be used as the system clock. * Versatile pin function selections allow more possibilities for using onchip peripheral Applications * Industrial control * Medical systems * Access control * Communication Gateway * General-purpose application. APB peripherals are also allocated a 2MB range of addresses. Each AHB peripheral is allocated a 16KB address space within the AHB address space. or the RTC oscillator. the ARM7 Local Bus for closely coupled. beginning at the 3. [7] . For USB and CAN application. Ltd. ARCHITECTURE OVERVIEW The LPC2378 consists of an ARM7TDMI-S CPU with emulation support. The microcontroller permanently configures theARM7TDMI-S processor for little-endian byte order. the AMBA Advanced High-performance Bus (AHB) interfacing to high speed on-chip peripherals and external memory. Each APB peripheral is allocated a 16KB address space within the APB address space. high speed access to the majority of onchip memory. * Boundary scans for simplified board testing. and the AMBA Advanced Peripheral Bus (APB) for connection to other on-chip peripheral functions. The AHB to APB Bridge interfaces the APB bus to the AHB bus. This is possible because THUMB code operates on the same 32bit register set as ARM code. which makes it ideally suited to high-volume applications with memory restrictions. The key idea behind THUMB is that of a superreduced instruction set. its successor is being decoded.ViARM-2378 DEVELOPMENT BOARD ARM7TDMI Processor The ARM7TDMI-S is a general. * A 16-bit THUMB instruction set. The ARM7TDMI-S processor is described in detail in the ARM7TDMI-S Datasheet that can be found on official ARM website. The THUMB set’s 16-bit instruction length allows it to approach twice the density of standard ARM code while retaining most of the ARM’s performance advantage over a traditional 16-bit processor using 16-bit registers. the ARM7TDMI-S processor has two instruction sets: * The standard 32-bit ARM instruction set.. and the instruction set and related decode mechanism are much simpler than those of micro programmed Complex Instruction Set Computers. The ARM architecture is based on Reduced Instruction Set Computer (RISC) principles. Vi Microsystems Pvt. which offers high performance and very low power consumption.purpose 32-bit microprocessor. THUMB code is able to provide up to 65% of the code size of ARM. Ltd. and a third instruction is being fetched from memory. [8] . while one instruction is being executed. Typically. and 160% of the performance of an equivalent ARM processor connected to a 16-bit memory system. Essentially. This simplicity results in a high instruction throughput and impressive real-time interrupt response from a small and cost-effective processor core. or applications where code density is an issue. Pipeline techniques are employed so that all parts of the processing and memory systems can operate continuously. The ARM7TDMI-S processor also employs a unique architectural strategy known as THUMB. . [9] . Ltd.ViARM-2378 DEVELOPMENT BOARD BLOCK DIAGRAM Vi Microsystems Pvt. 2. 5. SD Card Interface. Character Based LCD (16 x 2 & 20 x 4). Graphics LCD (128 x 64). 9. 14. Stepper Motor Interface.ViARM-2378 DEVELOPMENT BOARD CHAPTER .2 HARDWARE DETAILS ViARM-2378 Development Board features a number of peripheral Devices. Two SPDT Relay. 4. you need to check if appropriate jumpers have been properly set. 10. [ 10 ] . 7. USB 2. Vi Microsystems Pvt. Two RS232 Port. I2C Peripherals. In order to enable these devices before programming. 11. 8 Digital Inputs . 8 Digital Outputs – LED. ViARM-2378 Development Board populated with ARM7 Core LPC2378 CPU.. * 7 Segment Display. 6. 13. On Board Peripherals 1.0 Interface. 3. * Serial EEPROM. 10/100 Base T Ethernet Interface. Temperature Sensor. 12. Ltd. IrDA. 8. 4 x 4 Matrix Keypad.Switch. * Real Time Clock. [ 11 ] .ViARM-2378 DEVELOPMENT BOARD 15. 25. Zigbee 27. 17. 22.. OLED Interface 28. Digital To Analog Converter. USB Audio Device. J-Trace Connector. 19. Two CAN Port. PS/2 Keyboard connector. Joystick. SPI Interface 26. 20. 24. Ltd. 23. 16. 50-Pin Expansion Header. Jtag Connector. Accelerometer. TFT LCD Interface Vi Microsystems Pvt. Analog To Digital Converter. 21. 18. ViARM-2378 has 8 LED’s that are connected to the Microcontroller Port Line.7 2.. While we using LEDs. close the Jumper J38.ON and OFF. Ltd.ViARM-2378 DEVELOPMENT BOARD 1. LC_LED 0 R14 LC_LED R15 LC_LED R15 LC_LED R15 LC_LED R15 LC_LED R15 LC_LED R15 LC_LED R15 330 330 E 330 330 330 330 330 E 330 L22 L21 L20 L19 L18 L17 L16 L15 LED LED LED LED LED LED LED LED 1 J38 2 JMP- Used Port Lines: LED0 – LED7 : P3.0 . which have a toggle to establish or break a connection between two contacts. SW11 SW7 SW6 SW5 SW4 SW3 SW2 SW1 SW0 1 2 3 4 5 6 7 8 16 15 14 13 12 11 10 9 SW DIP-8 Used Port Lines: SW0 – SW7 : P4. [ 12 ] . LED’s Light Emitting Diodes are the most commonly used components. usually for displaying Pin’s Digital State.0 – P3.7 Vi Microsystems Pvt.P4. SWITCHES Switches are devices that have two positions . The ViARM2378 Development Board has one 8-Way Dip Switch. Ltd.P4. each made up of 5x8 Pixels.P4.K8 : P4.P4.15 Scan Lines : P4.8 . Usually it can display four lines of 20 alphanumeric characters.Character Based LCD A standard character LCD is probably the most widely used data Visualization component. Vi Microsystems Pvt. K8 K7 K6 K5 1 1 1 1 2 SW6 2 SW5 2 SW4 2 SW3 1 1 1 2 1 SW10 2 SW9 2 SW8 2 SW7 SW13 SW14 SW15 SW16 2 1 2 1 2 1 2 1 SW18 SW19 SW20 SW21 1 2 1 2 1 2 2 1 K4 K3 K2 K1 Used Port lines K1 .15 4. LCD (Liquid Crystal Display) . In ViARM2378 has 16 keys which are connected in Matrix format.. [ 13 ] .8 . we can connect the Keys in the form of Matrix.12 .ViARM-2378 DEVELOPMENT BOARD 3. The Character LCD communicates with the microcontroller via 8-bit data bus. The Connection to the Microcontroller is shown in below.11 Read lines : P4. Matrix KEY For Pin reduction. Ltd.21 P1. The GLCD’s Contrast can be adjusted using the Potentiometer. close the jumpers J13 to J16 as Downward Direction and close the jumper J42 as left side direction Vi Microsystems Pvt.7 P0. Graphics LCD A Graphics LCD (GLCD) allows advanced visual messages to be displayed. While a character LCD can display only alphanumeric characters. [ 14 ] .. The Most commonly used graphic LCD has the screen resolution of 128x64 Pixels. the user needs to set the Jumpers.P3.28 P3.23 5.ViARM-2378 DEVELOPMENT BOARD LCD1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 VCC BR RS DIOW LCD_E LC_LED N LC_LED LC_LED 1 LC_LED 2 LC_LED LC_LED 4 LC_LED R89 LC_LED 6 1K VCC RST VCC Used Port lines: Data lines RS DIOW LCDEN : : : : P3. BR TP2 10K LCD2 -10V VCC 3 VCC 1 2 1 R103 1K SP6 SMD PAD 3 VCC -10V SP7 SMD PAD BR RS DIOW LCD_EN LC_LED0 LC_LED1 LC_LED2 LC_LED3 LC_LED4 LC_LED5 LC_LED6 LC_LED7 CS1 CS2 LCD RST- 2 2 VCC 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 J42 JMP-3 -12V LCD RST- G_LCD DISPLAY While we using the GLCD. a GLCD can be used to display messages in the form of drawings and bitmaps. Before a GLCD is connected.0 . a level transition buffer such as the MAX232 must be used. for the transfer of data between the microcontroller and a PC. RS-232 Communication RS-232 Communication enables point-to-point Data transfer.1M F 2 J34 2 J35 JM JM PP1 21 2 RXD TXD ViARM-2378 Development board has Two UART Termination at 9 pin Dtype male connector.28 P3.1M F C62 15 14 13 7 8 0. GLCD unit can be permanently damaged. While we using the UART1. If the Power supply is connected while placing.28 Note: Make sure to turn off the Power supply before placing GLCD on development board. close the jumpers J1 & J2 While we using the UART2. [ 15 ] . close the jumpers J3 & J4 Vi Microsystems Pvt.0 .3V VGND T1OU R1IN T2OU TR2IN 16 2 6 C59 0.ViARM-2378 DEVELOPMENT BOARD Used Port lines: Data lines RS DIOW LCDEN CS1 CS2 : : : : : : P3. 6. It is commonly used in data acquisition applications.29 P4.1M 5 F 11 C2OLED_TX 12 T1IN D 10 R1OU T 9 T2IN OLED_RX R2OU T C61 +3. Since the Voltage levels of a microcontroller and PC are not directly compatible with each other.P3.12 P1.1M F 1 3 C1+ VCC C1- V+ 4 C2+ 0.23 P4. U21 ICL23 C60 0. Ltd..7 P0. Controller on ViARM-2378 communicates with SD via SPI Communications. I2C Based Real Time Clock 2. This is implemented by an “ Acknowledge” System. This module is built into many arm Controllers. Data is exchanged between these devices. in a form that can easily be removed for access by a PC. I2C Based Seven Segment Display Vi Microsystems Pvt. [ 16 ] . I2C is a synchronous protocol that allows a master device to initiate communication with a slave device..3V 33K R94 330 R95 2K 33K 33K C54 L14 LED 18pF SD CARD CP J41 1 JMP-2 2 While using SD card close the jumpers J40 and J41. a digital camera would use an SD card for storing image files. For example. user to set the Jumpers as shown below. It allows I2C serial communication between two or more devices at a high speed. In ViARM-2378 Development Board consist of three I2C based Peripherals. I2C Peripherals I2C Stands for Inter integrated Circuit Communications.3V DC. 8.3V MCIDAT3 R139 3 4 5 1 MCICLK 7 MCIDAT0 BD3 MCIDAT0 R146 8 MCIDAT1 MCIDAT1 R147 9 MCIDAT2 MCIDAT2 R138 13 15 R144 33K 2 470nH + C58 47uF/6. With an SD card reader user can easily transfer the data from SD card to PC and Vice versa. 2 WP J40 JMP-2 SD1 WP1 WP2 CD/DAT3/CS CMD/DI VSS1 VDD CLK VSS2 DAT0 DAT1 DAT2 CP1 CP2 1 10 R145 33K 14 R143 2K 1 MCIDAT3 2 MCICMD +3.3V 6 33K +3. Ltd. I2C is also Bi-Directional. Operating Voltage of SD card is 3.ViARM-2378 DEVELOPMENT BOARD 7. To enable SD card. I2C Based Serial EEPROM 3.3V +3. 1. MMC/SD (Multimedia CARD) SD card us used as storage media for a portable devices. as well as lower power consumption. automotive. DC23 0. Serial EEPROM devices offer a lower pin count.3V +3.3K SDA0 4 [ 17 ] . +3. Ltd.768KHz 3 5 8 SDA0 C64 22pF DC24 0.1MF/C 8 7 6 5 R92 3. smaller packages.. Primarily used to store personal preference data and configuration/setup data.ViARM-2378 DEVELOPMENT BOARD Real Time Clock Communication Protocol Hardware IC Application : : : : Two Wire Communication I2C PCF8583 Clock and calendar CMOS VCC SCL0 C63 22pF U20 PCF8583 6 7 SCL INT 4 VSS XTAL1 XTAL2 A0 SDA VCC 1 2 Y4 32.3V +3.1MF CMOS VCC EEPROM Serial-interface EEPROM’s are used in a broad spectrum of consumer. Compared to other NVM solutions. Serial EEPROM’s are the most flexible type of non-volatile memory utilized today. telecommunication. industrial and PC related markets. medical.3V U19 24LS256 1 2 3 A0 A1 VCC Q A2 Q COUT GND Vi Microsystems Pvt.3V +3.3K SCL0 R93 3. lower voltages. There are also fourteen-segment displays and sixteen-segment displays (for full alphanumeric). Ltd. as its name indicates.ViARM-2378 DEVELOPMENT BOARD I2C Based Seven Segment Display A seven-segment display. or italic. less commonly known as a seven-segment indicator. is a form of display device that is an alternative to the more complex dot-matrix displays. A seven-segment display. U23 PCF8574 SA0 SB0 SC0 SD0 1 2 3 4 RN1 3.3K RN SDP0 SG0 SF0 SE0 DISP1 D_CC SF0 SG0 SE0 SD0 CC2 F G E D CC2 a F f g G E e d D A b B C c DP dpCC1 A B C DP CC1 SA0 SB0 SC0 SDP0 D_CC LTS543 Vi Microsystems Pvt.. [ 18 ] . however. Each of the numbers and may be represented by two or more different glyphs on seven-segment displays. The seven segments are arranged as a rectangle of two vertical segments on each side with one horizontal segment on the top and bottom. arrangement. Additionally. which aids readability. Seven-segment displays are commonly used in electronics as a method of displaying decimal numeric feedback on the internal operations of devices. is composed of seven elements.3K RN 8 7 6 5 1 2 3 4 5 6 7 8 A0 A1 A2 P0 P1 P2 P3 VSS VDD SDA SCL INTP7 P6 P5 P4 16 15 14 13 12 11 10 9 VCC 1 2 3 4 SDA0 SCL0 RN6 8 7 6 5 3. the seventh segment bisects the rectangle horizontally. these have mostly been replaced by dot-matrix displays. The letters A to G refers to the segments of a 7-segment display. Individually on or off. Often the seven segments are arranged in an oblique. they can be combined to produce simplified representations of the Hindu-Arabic numerals. .24 [ 19 ] . a diode is frequently installed across the coil. If the coil is designed to be energized with AC. COM1 D15 1N4001 P11 COIL1 COIL2 Q2 SL100 R19 100E P3. The movement either makes or breaks a connection with a fixed contact. a small copper ring can be crimped to the end of the solenoid. a solid-state relay is made with a thyristor or other solid-state switching device. Ltd. When a current flows through the coil. to dissipate the energy from the collapsing magnetic field at deactivation. which increases the minimum pull on the armature during the AC cycle. In the original form. When the current to the coil is switched off.ViARM-2378 DEVELOPMENT BOARD 9. In a low voltage application. Most relays are manufactured to operate quickly. this is to reduce noise. a lightemitting diode (LED) is used with a phototransistor. this is to reduce arcing. the switch is operated by an electromagnet to open or close one or many sets of contacts. Usually this is a spring. To achieve electrical isolation. By analogy with the functions of the original electromagnetic device. +12V RL1 1 2 3 NC1 NO1 COM2 NC2 NO2 J801-3 RELAY SPDT Vi Microsystems Pvt. This "shading ring" creates a small out-of-phase current. a force approximately half as strong as the magnetic force returns the armature to its relaxed position. the resulting magnetic field attracts an armature that is mechanically linked to a moving contact. If the coil is energized with DC. Relay A relay is an electrical switch that opens and closes under the control of other an electrical circuit. which would otherwise generate a spike of voltage and might cause damage to circuit components. but gravity is also used commonly in industrial motor starters. In a high voltage or high current application. 26 Used Port lines P3.. Temperature Sensor A signal conditioner is a device that converts one type of electronic signal into a another type of signal.24 and P3. In performing this conversion a number of functions may take place.2PIN 7 1 C67 + 1uF(TAN) 3 U24 OP07 6 + -12V - J801 . They include: +12V C1 1uF(TAN) + R108 R6 56K 27K -12V DC4 TEMP I/P 2 R109 1K P8 1 2 J801 . [ 20 ] . Ltd.1MFD +12V Vi Microsystems Pvt. 10.2PIN 4 8 P9 1 2 0.1MFD TP1 100K DC5 0.26. Its primary use is to convert a signal that may be difficult to read by conventional instrumentation into a more easily read format.ViARM-2378 DEVELOPMENT BOARD +12V RL2 1 2 3 NC1 COM1 NO1 COM2 NC2 NO2 J801-3 D16 1N4001 P12 COIL1 COIL2 R33 Q3 SL100 RELAY SPDT 100E P3. Isolation is also used to prevent ground loops. on the other hand. [ 21 ] . Strain gages and RTDs are two common examples.ViARM-2378 DEVELOPMENT BOARD 1. Ltd. Stepper Motor Stepper motors operate differently from normal DC motors. That is. Converting a 0-10mV signal to a 0 -10V signal is an example of amplification. Amplification When a signal is amplified. and from there the process is repeated. Stepper motors. the gear rotates slightly to align with the next one. as shown at right. which simply spin when voltage is applied to their terminals. Linearization Converting a non-linear input signal to a linear output signal. Each of those slight rotations is called a "step. Cold Junction Compensation Used for thermocouples. the overall magnitude of the signal is increased. thermocouple input 11." In that way. unwanted signals on the input line are prevented from passing through to the output. To make the motor shaft turn. the motor can be turned a precise angle. they are slightly offset from the next electromagnet. So when the next electromagnet is turned on and the first is turned off. This is common for thermocouple signals. Vi Microsystems Pvt. first one electromagnet is given power. Excitation Many sensors require some form of excitation for them to operate. The input is normally transferred to the output by converting it to an optical or magnetic signal then it is reconstructed on the output. effectively have multiple "toothed" electromagnets arranged around a central metal gear. Isolation is required when a measurement must be made on a surface with a voltage potential far above ground. which makes the gear's teeth magnetically attracted to the electromagnet's teeth.. By breaking the galvanic path between input and output. There are two basic arrangements for the electromagnetic coils: bipolar and unipolar. there is no physical wiring between the input and output. The thermocouple signal is adjusted for fluctuations in room temperature. Electrical Isolation Electrical isolation breaks the galvanic path between the input and output signal. When the gear's teeth are thus aligned to the first electromagnet. Unipolar controllers need center-tapped windings. soft magnetic material with many teeth on the rotor and stator cheaply multiplies the number of poles (reluctance motor). allowing a stepless operation. Simpler models switch voltage only for doing a step. Closed 2 and 3 - External voltage for stepper motor. [ 22 ] . Their needs to be an explicit way to handle this extra current in a circuit otherwise it can cause damage and affect performance of the motor. The torque they produce rates stepper motors. Collector is connected to the coil wire of the motor. and unconnected. ground.. Synchronous electric motors using soft magnetic materials (having a core) have the ability to provide position-holding torque (called detent torque. because the voltage is already hard wired. Bipolar controllers can switch between supply. pulsewidth modulation is used instead to regulate the mean current. The idea is to connect the output pins of the driver to 4 transistors. The transistor must be grounded at the emitter and the driver pin must be connected to the base. ideally drives it but this puts some burden on the controller. Additionally. which means that once the coil is turned off it starts to generate current because the motor is still rotating.ViARM-2378 DEVELOPMENT BOARD Theory A step motor can be viewed as a DC motor with the number of poles (on both rotor and stator) increased. sinusoidal current. 256 micro steps per step are possible. they switch a single cable to the motor. VCC SP2 1 2 MOTOR VCC 3 JMP3 P7 1 2 J801-2 Jumper Position Closed 1 and 2 - Internal voltage for stepper motor. the coils in a stepper motor must reach their full rated current during each step. Unipolar controllers can only connect or disconnect a cable. It is possible to drive Unipolar stepper motors with bipolar drivers. To achieve full rated torque. As a digital-toanalog converter produces unwanted Ohmic heat in the controller. Vi Microsystems Pvt. Ltd. When using an 8bit digital controller. voltage. The voltage rating (if there is one) is almost meaningless. thus needing an extra current limiter: for every step. The motors also suffer from EMF. Like an AC synchronous motor. taking care that they have no common denominator. and sometimes included in the specifications) while not driven electrically. computers and other devices (such as printers) come with IrDA ports.ViARM-2378 DEVELOPMENT BOARD In ViARM-2378 Development board consists of stepper motor driver. For example.1uF R111 C77 R110 C74 . This enables you to transfer data from one device to another without any cables.8 Coil 4 : P0. without needing to connect the two with a cable.2K 9 . D3 D4 D5 D6 FR107 FR107 FR107 4 8.9 While we using the Stepper motor close Jumpers: J12-J15 as upward direction. Ltd.6 Coil 2 : P0. IrDA Infrared Data Association.7 IO_P0. you can simply put your computer in front of the printer and output a document.1uF MOTOR VCC 10uF/16V FR107 C73 VCC 11 2 6 P6 5 PIN RMC RN4 8 7 6 5 1 2 3 4 5 3 7 1K MOTOR VCC 10 13 12 14 D7 D8 D9 D10 FR107 FR107 FR107 FR107 1 2 3 4 8 RN3 8 7 6 5 3.. if both your laptop computer and printer have IrDA ports. Vi Microsystems Pvt.6 IO_P0. a group of device manufacturers that developed a standard for transmitting data via infrared light waves.3K 5 1 1 2 3 4 15 IO_P0. Increasingly.8 IO_P0. which is shown in below. [ 23 ] .7 Coil 3 : P0.9 Used Port Lines Coil 1 : P0.2K U9 L298N 8. 12. The methods used show some similarities to radio systems. The only restrictions on their use are that the two devices must be within a few feet of each other and there must be a clear line of sight between them. Ethernet Ethernet is a large.3V 10K R106 100nF C66 +3. largely replacing competing LAN standards such as coaxial cable Ethernet. [ 24 ] . 13.3. the wireless LAN standardized by IEEE802. The combination of the twisted pair versions of Ethernet for connecting end systems to the network. Wi-Fi. although there are major differences. diverse family of frame-based computer networking technologies that operates at many speeds for local area networks (LANs). FDDI. through means of network access at the Media Access Control (MAC)/Data Link Layer. It defines a number of wiring and signaling standards for the physical layer. It has been in use from the 1990s to the present. 10K +3.ViARM-2378 DEVELOPMENT BOARD IrDA ports support roughly the same transmission rates as traditional parallel ports. has been used instead of Ethernet for many home and small office networks and in addition to Ethernet in larger installations. along with the fiber optic versions for site backbones. token ring. such as the fact that it is much easier to detect collisions in a cable broadcast system than a radio broadcast. Ethernet has been standardized as IEEE802.3V R167 3 TDIR 10K RDIR 10K R104 R107 100nF C65 +3.3V 7 4 1 2 6 5 8 IR1 TFDU4100 SC TXD RXD IRED_ANODE IRED_CATHODE VCC1 NC GND (IR COMPONENT) R105 TDIR 10K While we using the IrDA. The common cable providing the communication channel was likened to the ether and it was from this reference that the name "Ethernet" was derived. Ethernet was originally based on the idea of computers communicating over a shared coaxial cable acting as a broadcast transmission medium.11. Vi Microsystems Pvt. close the above Jumpers J13 and J14 as upward direction. Ltd. and a common addressing format. The name comes from the physical concept of the ether. and ARCNET. In recent years. has become the most widespread-wired LAN technology.. 9E R63 49. +2. Network interface cards (NICs) or chips normally do not accept packets addressed to other Ethernet stations.9E R59 49. and enable point-to-point management and troubleshooting. Adapters generally come programmed with a globally unique address. Ethernet stations communicate by sending each other data packets.01MF0.ViARM-2378 DEVELOPMENT BOARD From this early and comparatively simple concept. all generations of Ethernet (excluding very early experimental versions) share the same frame formats (and hence the same interface for higher layers). Above the physical layer.5V C43 49. Due to the ubiquity of Ethernet. small blocks of data that are individually sent and delivered. most manufacturers now build the functionality of an Ethernet card directly into PC motherboards. Vi Microsystems Pvt. Ltd.9E R54 18pF NC GND RJ-45 CON. and the reduced panel space needed by twisted pair Ethernet. and can be readily (and in most cases. The coaxial cable was later replaced with point-to-point links connected together by hubs and/or switches in order to reduce installation costs. Ethernet evolved into the complex networking technology that today powers the vast majority of local computer networks. each Ethernet station is given a single 48 bit MAC address. obviating the need for installation of a separate network card. As with other IEEE 802 LANs.. Despite the very significant changes in Ethernet from a thick coaxial cable bus running at 10 Mbit/s to point-to-point links running at 1 Gbit/s and beyond. [ 25 ] . the ever-decreasing cost of the hardware needed to support it. twisted-pair network.01MF 6 7 8 P22 TOUT+ TOUTTPIN+ CT CT TPIN- 8 7 6 5 4 3 2 1 E_RX- E_RX+ E_TXE_TX+ RJ-45 FRONT VIEW TX+ LPF 49. increase reliability. The advent of twisted-pair wiring enabled Ethernet to become a commercial success. which is used both to specify the destination and the source of each data packet. or to use locally administered addresses. either to avoid an address change when an adapter is replaced. but this can be overridden.9E R70 1 TX- 2 RX+ 3 4 5 RXC36 C37 0. Star LAN was the first step in the evolution of Ethernet from a coaxial cable bus to a hub-managed. cheaply) interconnected. 3V LED100 LEDACT PHY_INT 13 14 15 16 17 18 19 20 21 22 23 24 R62 1k 36 35 34 33 32 31 30 29 28 27 26 25 BD2 +2. the KS8721BL represents Micrel’s fourth generation single-port fast Ethernet PHY.1MF + C41 10uF/16V E_CRS R67 NA E_CRS +3. Using a unique mixed-signal design that extends signaling distance while reducing power consumption. Micrel’s architecture dissipates an ultra-low 275mW in power. The KS8721BL automatically configures itself for 100Mbps or 10Mbps and full-or half-duplex operation using an on-chip auto negotiation algorithm. Multiple power down modes. 100BASE-TX and 100BASEFX applications. allow further levels of power saving through manual selection or automatic detection of cable energy.5V + C38 0.5V FB0805 TX+ TX- 10uF/16V R50 +2.1MF CRY_IN CRY_OUT C35 E_MDIO E_RXD1 E_RXD0 +3. the KS8721BL/SL provides an easy to use high performance solution for 10BASE-T.3V E_RX_ER 1 2 3 4 5 6 7 8 9 10 11 12 MDIO MDC RXD3/PHYAD1 RXD2/PHYAD2 RXD1/PHYAD3 RXD0/PHYAD4 VDDIO GND RXDV/PCS_LPBK RXC RXER/ISO GND GND GND FXSD/FXEN RX+ RXVDDRX PD# LED3/NWAYEN LED2/DUPLEX LED1/SPD100 LED0/TEST INT#PHYAD0 U15 KS8721BL VDDC TXER TXC/REF_CLK TXEN TXD0 TXD1 TXD2 TXD3 COL/RMII COL/RMI_BTB GND VDDIO E_MDIO E_MDC RST# VDDPLL X1 X0 GND GND VDDTX TX+ TXGND VDDRCV REXT R58 10K RX+ RXR53 1k R61 R60 R69 R68 330E 330 33E 33E +2. including transmit output derivers. [ 26 ] . 10K BD1 RST- 1K R51 1K 48 47 46 45 44 43 42 41 40 39 38 37 +3.7K +3.5V +2.ViARM-2378 DEVELOPMENT BOARD ABOUT KS8721BL (10/100Base-TX/FX PHYSICAL LAYER TRANSCEIVER) The KS8721BL is a 10BASE-T.5V +3.3V FB0805 C42 E_RX_CLK E_TX_EN E_TXD0 E_TXD1 E_TXD2 E_TXD3 +3.3V R52 +2. accessed via configuration pins or registers. This translates to increased reliability while enabling development in today’s power sensitive applications.3V Vi Microsystems Pvt..5V 0.3V R66 4. Combined with auto MDI/MDIX for automatic correction and detection of crossover and straight through cables. Ltd. 100BASE-TX and 100 BASE-FX physical layer transceiver providing M11/RM11 interfaces to MACS and switches. 10 E_RX_ER : P1. [ 27 ] .1 E_TX_EN : P1.ViARM-2378 DEVELOPMENT BOARD LPC2378 port lines are connected with 10/100Base-TX/FX transceiver are.4 E_CRS : P1.PC to HUB communication Vi Microsystems Pvt. E_TXD0 : P1.9 E_RXD1 : P1. Ltd..14 E_RX_CLK : P1. Cross over cable .30 Applications LAN on Motherboard Media Converter Set-Top Box Cable/DSL Modem Network Printer Game console Cable configuration 1.0 E_TXD1 : P1. Straight Cable .16 E_MDIO : P1.PC to PC or PC to Kit communication 2.17 PHY_INT : P0.15 E_MDC : P1.8 E_RXD0 : P1. An operating system is supposed to implement all device classes so as to provide generic drivers for any USB device. web cam-like devices. USB can connect computer peripherals such as mouse devices. USB is also used extensively to connect nonnetworked printers. 0x03: USB human interface device class ("HID"). USB is intended to help retire all legacy serial and parallel ports. 0x0E: USB video device class. USB simplifies connecting several printers to one computer. These classes define an expected behavior in terms of device and interface descriptors so that the same device driver may be used for any device that claims to be a member of a certain class.. The Device Working Group of the USB Implementers Forum decides upon device classes. an industry standards body incorporating leading companies from the computer and electronics industries. USB has become the standard connection method. 6. 3. Vi Microsystems Pvt. Ltd. 0x08: USB mass storage device class used for USB flash drives. 0xE0: Wireless controllers. A major component in the legacy-free PC. Microsoft. 4. standardizes the design of USB. PDAs. but it has become commonplace on other devices such as PDAs and video game consoles. Device Classes Devices that attach to the bus can be full-custom devices requiring a fullcustom device driver to be used. For many devices such as scanners and digital cameras. Example device classes include: 1. 0x09: USB hubs. scanners.ViARM-2378 DEVELOPMENT BOARD 14. Universal Synchronous Bus (USB) Universal Serial Bus (USB) is a serial bus standard to interface devices. for example Blue tooth dongles. memory card readers. keyboards. etc. to improve plug-and-play capabilities by allowing devices to be connected and disconnected without rebooting the computer (hot swapping). Other convenient features include powering low-consumption devices without the need for an external power supply and allowing some devices to be used without requiring individual device drivers to be installed. digital audio players etc.. there were about 1 billion USB devices in the world. or may belong to a device class. motion image capture devices. mice. USB was originally designed for personal computers. NEC. 2. game pads and joysticks. [ 28 ] . Notable members have included Apple Inc. USB was designed to allow peripherals to be connected using a single standardized interface socket. 0x0B: Smart card readers. digital cameras and printers. The USB Implementers Forum (USB-IF). keyboards. Hewlett-Packard. 5. In 2004. Intel and Agere. 0–0. they are not separate simplex connections. However. a typical USB mass-storage device USB implements connection to storage devices using a set of standards called the USB mass storage device class (referred to as MSC or UMS). or empty enclosures for drives. and automatically detect which type of port they are plugged in to. This was initially intended for traditional magnetic and optical drives. There is no logic inside these adaptors: they make use of the fact that such HID interfaces are equipped with controllers that are capable of serving both the USB and the PS/2 protocol.8–3. that offer performance comparable to internal drives. Vi Microsystems Pvt. keypads. but because most PC motherboards still retain PS/2 connectors for the keyboard and mouse as of 2007. making it useful for external drives. and PS/2 connectors to USB. Joysticks. Human-interface devices (HIDs) Mice and keyboards are frequently fitted with USB connectors.3 volts for low and 2. USB signals are transmitted on a twisted pair of data cables. labeled D+ and D−. the drive appears to the user just like another internal drive. PC game port. D+ and D− usually operate together. USB has one important advantage in that it is possible to install and remove devices without opening the computer case.6 volts for high. are generally supplied with a small USB-to-PS/2 adaptor so that they can be used with either USB or PS/2 ports. Functionally. USB is not intended to be a primary bus for a computer's internal storage: buses such as ATA (IDE). ATAPI. Transmitted signal levels are 0. tablets and other human-interface devices are also progressively migrating from MIDI. Today a number of manufacturers offer external portable USB hard drives. ATA. or even SCSI) to a USB port. SATA. Serial ATA (SATA). USB signaling The USB standard uses the NRZI system to encode data. These external drives usually contain a translating device that interfaces a drive of conventional technology (IDE.ViARM-2378 DEVELOPMENT BOARD USB mass-storage A Flash Drive. Apple Macintosh computers have used USB exclusively for all wired mice and keyboards since January 1999. These collectively use half-duplex differential signaling to combat the effects of electromagnetic noise on longer lines. Ltd. [ 29 ] . Other competing standards that allow for external connectivity are SATA and Fire wire. and SCSI fulfill that role. but has been extended to support a wide variety of devices.. 0 specification and many devices fall back to Full Speed.8 P2.6 P2. A Hi-Speed rate of 480Mbit/s (48MB/s). Ltd. Direct Port Access All the Controller input/output pins can be accessed via 50 Pin Box type header.9 P0. not all USB 2.0 devices are Hi-Speed. P17 K5 LC_LED7 LC_LED6 LC_LED5 LC_LED4 LC_LED3 LC_LED2 LC_LED1 LC_LED0 SW0 SW1 SW2 SW3 SW4 SW5 SW6 SW7 K1 K2 K3 K4 VCC +12V 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 K6 VCC P2. mice.0" and advertised as "up to 480Mbit/s". All USB Hubs support Full Speed. Full Speed was the fastest rate before the USB 2. Ensure that the on-board peripherals are disconnected from micro controller by setting the appropriate jumpers.4 P2.7 P2.1 P2. The actual throughput currently (2006) attained with real devices is about half of the full theoretical (48MB/s) data throughput rate. This connector can be used for system expansion with external boards. 3.24 P0.5 P2. and joysticks.ViARM-2378 DEVELOPMENT BOARD USB supports three data rates: 1.6kB/s) that is mostly used for Human Interface Devices (HID) such as keyboards. We are providing all those 2378 examples 15. [ 30 ] ..23 K7 SPI_CS1 SPI_CS2 TDIR RSTRST +3.3 P2. often about 3MB/s overall. A Full Speed rate of 12Mbit/s (1.5Mbit/s (153. A Low Speed rate of 1.2 P2.0 (12Mbits) compatible Devices. Though Hi-Speed devices are commonly referred to as "USB 2. Full Speed devices divide the USB bandwidth between them in a first-come first-served basis and it is not uncommon to run out of bandwidth with several isochronously devices.2MB/s). LPC2378 CPU has Built in USB2. Most hi-speed USB devices typically operate at much slower speeds. 2. while external peripherals are using the same pins.0 P2. sometimes up to 10-20 MB/s.3V VCC -12V HEADER Vi Microsystems Pvt. messages are broadcast to all the nodes in the network using an identifier unique to the network.. sensors and actuators in a system or sub-system for real-time control applications.ViARM-2378 DEVELOPMENT BOARD 16. U8 MCP2551 VCC 3 5 4 1 VCC VREF RXD TXD CANH CANL GND RS CANH2 CANL2 7 6 2 8 R24 10K P5 1 2 3 J801-3 [ 31 ] . the individual nodes decide whether or not to process the message and also determine the priority of the message in terms of competition for bus access.3V VCC R26 R18 J6 JMP-2 L6 LED 3 5 4 1 0E VCC VREF RXD TXD CANH CANL GND RS 2 8 P4 CANH1 CANL1 7 6 R13 1 2 3 J801-3 10K VCC R27 DC2 100nF R15 120E 1. Based on the identifier. Equipped with an array of sensors. Beyond automobiles. as in the sense of conventional addressing in networks (such as Ethernet).2K L8 LED R25 J7 JMP-2 L9 LED 0E Vi Microsystems Pvt. Ltd.2K L7 LED RD1 TD1 DC1 100nF R11 CAN_RX CAN_TX R12 1. Rather.3V RD2 TD2 120E 1. Controller area networks were first developed for use in automobiles. This method allows for uninterrupted transmission when a collision is detected. CAN CAN is a serial bus network of microcontrollers that connects devices. +3. unlike Ethernets that will stop transmission upon collision detection. the network is able to monitor the systems that the automobile depends on to run properly and safely. controller area networks can be used as an embedded communication system for microcontrollers as well as an open JOYSTICK communication system for intelligent devices.2K U5 MCP2551 VCC +3. There is no addressing scheme used in controller area networks.2K CAN_RX CAN_TX R14 1. [ 32 ] .ViARM-2378 DEVELOPMENT BOARD 17. temperature compensation and g. Ltd. both inside the lab and outside. Includes a Sleep Mode that makes it ideal for handheld battery powered electronics. you can graph any of these components. Zero-g offset full-scale span and filter cut-off are factory set and require no external devices. or calculate the magnitude of then acceleration. There are sample data collected with the 3-axis The MMA7260Q low cost capacitive micro machined accelerometer features signal conditioning. The 3-Axis Accelerometer can be used for a wide variety of experiments and demonstrations. Vi Microsystems Pvt.Select which allows for the selection among for sensitivities.. a 1-pole low pass filter. ACCELEROMETER The 3-Axis Accelerometer consists of three –5 to + 5g accelerometers mounted in one small block. Using the appropriate data collection hardware and software. 3V +3.. JS1 LEFT CENTER R164 1 B<4> 2 330 DOWN A<1> 5 UP R163 330 COMMON<5> E<2> 3 4 C<3> D<6> 6 RIGHT JOYSTICK Vi Microsystems Pvt. Usually there's a button in the vicinity of the joystick.24 Y_OUT : P0.3V VDD VSS 3 DC3 4 100nF MMA7260Q Z_OUT 100nF R101 R100 1K R98 R99 1K R96 R97 XOUT YOUT ZOUT Used Port Lines X_OUT : P0.3V R102 1K +3. JOYSTICK It is an input device first found on arcade game machines. It consists of any stick-like object attached to a base that can be pushed in four or more directions. Joysticks come in many shapes and sizes. However. then home game systems. smaller joysticks that can be pushed around with a single finger have been added to some of the pads as well.ViARM-2378 DEVELOPMENT BOARD U18 15 14 13 1K C55 100nF 1K Y_OUT X_OUT 1K C56 5 6 7 8 9 10 11 16 C57 100nF 1K G_SEL1 G-SEL2 #SM NC1 NC2 NC3 NC4 NC5 NC6 NC7 NC8 1 2 12 +3.12 18. and finally on computers. [ 33 ] .23 Z_OUT : P0. with the typical arcade joystick having a large ball at the top that can be easily gripped. but lately. Ltd. cheap button pads in many home gaming systems have replaced joysticks. . which is compatible with the standard 20-pin connector and 38-pin connector defined by ARM. PS/2 ports are designed to connect the digital I/O lines of the microcontroller in the external device directly to the digital lines of the microcontroller.25 19.7 & P0. P0.ViARM-2378 DEVELOPMENT BOARD Used Port Lines Up : P1. [ 34 ] . with which it was introduced in 1987. J-TRACE J-Trace is a JTAG emulator designed for ARM cores which includes trace (ETM) support.7 While using PS2 Keyboard close the jumper J17 and J18. It connects via USB to a PC running Microsoft Windows 2000 or XP.18 Down : P1. Its name comes from the IBM Personal System/2 series of personal computers. The keyboard connector replaced the larger 5-pin DIN used in the IBM PC/AT design.8 1 J18 JMP-2 2 R49 P20 270E VCC PS/2 KEYBOARD 2 R48 270E 1 2 3 4 5 6 1 J17 JMP-2 P0.8 20.22 Left : P1. PS2 KEYBOARD The PS/2 connector is used for connecting a keyboard and a mouse to a PC compatible computer system. J-Trace has a built-in 20-pin JTAG connector and a built in 38-pin JTAG+Trace connector. Ltd.19 Right : P1. Vi Microsystems Pvt.27 Center : P1. Used Port Lines : P0. 1 3 5 7 9 11 13 15 17 19 +3. Used Port Lines : P2. JTAG is nowadays primarily used for accessing sub-blocks of integrated circuits. and is also useful as a mechanism for debugging embedded systems. Ltd. The debug module enables the programmer to debug the software of an embedded system. R141 R142 TRST TDI TMS TCK RTCK TDO RST- P27 2 4 6 8 10 12 14 16 18 20 +3.1 standard entitled Standard Test Access Port and Boundary-Scan Architecture for test access ports used for testing printed circuit boards using boundary scan. J-TAG JTAG (Joint Test Action Group) is the usual name used for the IEEE 1149.3V 10K Vi Microsystems Pvt. When used as a debugging tool.which in turn uses JTAG as the transport mechanism enables a programmer to access an on-chip debug module which is integrated into the CPU.3V P2.ViARM-2378 DEVELOPMENT BOARD P21 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 RSTTDO RTCK TCK TMS TDI TRST 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 TRACECLK P2. J21 as Downward direction.0 To P2.9 +3. providing a convenient "back door" into the system.8 TRACEPKT2 TRACEPKT1 TRACEPKT0 TRACESYNC PIPESTAT2 PIPESTAT1 PIPESTAT0 TRACE R135 J19 2 10K 1 JMP-2 TRACESYNC While we using J-Trace close the jumpers J26 to J31 as upward direction and also close J20.7 21. via the JTAG interface.. an in-circuit emulator . While designed for printed circuit boards.3V JTAG 10K [ 35 ] . 3V P24 AUDIO JACK 10K C47 100nP R136 100K C46 47pF 3 + 2 - U16 MCP601 6 4 8 2 R82 1 3 R84 470K R81 100 ZD1 BZV55C2V4 C45 MIC_IN C44 47pF 47pF ZD2 BZV55C2V4 R86 100K C48 1uF 10uF/16V 10E + U17 LM386 + - 3 2 1 5 AOUT EXT INT 3 .1uF 2 R91 33K J33 JM-3 R90 1K SPEAKER R137 C90 LS1 A_OUT 1 J32 33nF 2 C89 10 C49 + 7 6 R88 C50 . Vi Microsystems Pvt. [ 36 ] . such as tape transport mechanisms or CDROM drive control. VCC R85 470 VCC DC22 + C88 100nF R83 10K R87 100K 7 1 47uF/6. and sound-related functionality. An analog-to-digital converter (ADC) performs the reverse operation. voltage or electric charge).1uF . USB . The Audio Device Class does not include functionality to operate transport Mechanisms that are related to the reproduction of audio data. DIGITAL TO ANALOG CONVERSION (DAC) In Electronics. a digital-to-analog converter (DAC or D-to-A) is a device for converting a digital (usually binary) code to an analog signal (current. such as Volume and Tone Control. Digital-to-analog converters are interfaces between the abstract digital world and analog real life.. Ltd.3V +3.AUDIO DEVICE The Audio Device Class Definition applies to all devices or functions embedded in composite devices that are used to manipulate audio.ViARM-2378 DEVELOPMENT BOARD 22.1uF JMP-2 1 8 4 C53 10uF/16V AUDIO JACK INT C51 + 2 1 3 47nF P25 VCC EXT C52 A_OUT 23. This includes both audio data (analog and digital) and the functionality that is used to directly control the audio environment. voice. All Potentiometers outputs are in the range of 0V to 3. Vi Microsystems Pvt. These numbers are written to the DAC. Each Potentiometer can be connected on two different analog inputs. Normally the output voltage is a linear function of the input number.3V. close the Jumpers J36 and J37 as downward direction.3V. For that purpose.3V While we using the on-chip ADC1 and ADC2. LPC2378 CPU has Single channel DAC. usually an electrical voltage. analog input signals are terminated at 20pin Box type header (P23). sometimes along with a clock signal that causes each number to be latched in sequence.2378 Development board has two potentiometers for working with A/D Converter. ANALOG TO DIGITAL CONVERSION (ADC) ViARM . [ 37 ] . which is terminated at P29 connector 1st Pin. Applications of A/D conversion are various. This is equivalently a zero-order hold operation and has an effect on the frequency response of the reconstructed signal. Ltd. Usually these numbers are updated at uniform sampling intervals and can be thought of as numbers obtained from a sampling process. R159 ADC1 2 3 TP3 POT 1 100E +3.ViARM-2378 DEVELOPMENT BOARD A DAC usually only deals with pulse-code modulation (PCM) encoded signals. at which time the DAC output voltage changes rapidly from the previous value to the value represented by the currently latched number. you can measure any analog signal that fits in range acceptable by LPC2378. user can give external analog source. The DAC fundamentally converts finite-precision numbers (usually fixed-point binary numbers) into a physical quantity. Basically. The effect of this is that the output voltage is held in time at the current value until the next input number is latched resulting in a piecewise constant output. 24.. Jumpers group enables the connection between Potentiometer and LPC2378 Analog inputs.3V TP4 POT 2 R158 ADC2 100E 1 3 +3. That range is 0V to 3. Simultaneously. ARM processor takes analog signal from its input pin and translates it into a digital value. The job of converting various compressed forms of signals into PCM is left to codecs. The basic principle of a shift register is always present. In the standard configuration for a slave device two control and two data lines are used. This means there is one master. The data output SDO serves on the one hand the reading back of data. Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD 25. However. Of course there also exist shift registers with an odd number of bits. The SLAVE device receives the clock and chip select from the MASTER. [ 38 ] . Ltd. SPI Slave There is a MASTER and a SLAVE mode. while the number of slaves is only limited by the number of chip selects. The data output of the preceding device then forms the data input for the next IC. A SPI device can be a simple shift register up to an independent subsystem. CS and SCKL are therefore inputs. Normally the shift registers are 8Bit or integral multiples of it. SPI INTERFACE The Principle The Serial Peripheral Interface is used primarily for a synchronous serial communication of host processor and peripherals. The MASTER device provides the clock signal and determines the state of the chip select lines. For example two cascaded 9Bit EEPROMs can store 18Bit data.e. i.. CS and SCKL are therefore outputs. it activates the SLAVE it wants to communicate with. pumped into a shift register and are then internally available for parallel processing. offers however also the possibility to cascade several devices. Command codes as well as data values are serially transferred. a connection of two processors via SPI is just as well possible and is described at the end of the chapter. 1. thus forming a wider shift register. If independent slaves are to be connected to a master an other bus structure has to be chosen. the clock and the SDI data lines are brought to each slave. Also the SDO data lines are tied together and led back to the master. [ 39 ] . Cascading several SPI devices In illustration 2 the cascaded devices are evidently looked at as one larger device and receive therefore the same chip select. as shown in illustration 3. Master with Independed slave Vi Microsystems Pvt. they are treated as one slave and therefore connected to the same chip select. 3. so that it does not interfere with the currently activated devices. its data output goes into a high-impedance state (hi-Z). Ltd. 2. Here. Only the chip selects are separately brought to each SPI device. When cascading several SPI devices. Last not least both types may be combined.ViARM-2378 DEVELOPMENT BOARD If a SPI device is not selected. The data output of the preceding device is tied to the data input of the next.. The majority of SPI devices provide these four lines. With CS (Chip-Select) the corresponding peripheral device is selected. For the selection of slaves again two versions would be possible but only one variant is supported by hardware. named single-master protocol. Data and Control Lines of the SPI The SPI requires two control lines (CS and SCLK) and two data lines (SDI and SDO). it is necessary to consult the data sheets of the components one wants to use. resembles the normal master-slave communication. SPI . This pin is mostly active-low.. SPI Configuration Because there is no official specification. The micro controller configured as a slave behaves like a normal peripheral device. These four modes are the combinations of CPOL and CPHA. The chip select line is named SS (SlaveSelect). [ 40 ] . in practice four modes are used. The first variant. Ltd. all other slaves are in high-impedance state.ViARM-2378 DEVELOPMENT BOARD It is also possible to connect two micro controllers via SPI. the four modes are listed. SPI-mode CPOL CPHA 0 1 2 3 0 0 1 1 0 1 0 1 4. Although not specified by Motorola. For such a network. there is only one master and several slaves and in the second. Only the selected slave drives its output. In the first. The output remains active as long as the slave is selected by its address. while in the other the selection of the slaves is done by means of an ID packed into the frames. There are no general rules for transitions where data shouls be latched. each micro controller can take the role of the master. In table 1. Motorola names these lines MOSI (Master-Out-Slave-In) and MISO (Master-In-Slave-Out). what exactly SPI is and what not. The assignment of the IDs is done by software. In the unselected state the SDO lines are hi-Z and therefore inactive. Sometimes it happens that SDI and SDO are multiplexed. The hardware supported variant is with the chip selects. The master decides with which peripheral device it wants to communicate.Modes Vi Microsystems Pvt. Important are the permitted clock frequencies and the type of valid transitions. The clock serves as synchronization of the data communication. two protocol variants are possible. The clock line SCLK is brought to the device whether it is selected or not. The available types and their characteristics are now discussed. A positive polarity results in latching data at the rising edge of the clock. data is latched at the rising edge of the clock with CPOL = 0.7V to 5V) allowing their use in low-voltage applications.12 up to 24Bit with clock frequencies from 30ksps up to 600ksps. Capacities range from a couple of bits up to 64KBit. Memory devices are mostly EEPROM variants. UART. 8. Devices belonging to the last both groups are more rarely. [ 41 ] . memories and RTCs. which peripheral types exist and which can be connected to the host processor. potentiometer. If CPHA = 1. CPOL = 0 means falling edge. The micro controllers from Motorola allow the polarity and the phase of the clock to be adjusted. Most peripherals.10. i. Peripheral types can be subdivided into the following categories: • Converters (ADC and DAC) • Memories (EEPROM and FLASH) • Real Time Clocks (RTC) • Sensors (temperature. Ltd.e. and at the falling edge of the clock with CPOL = 1. The Different Peripheral Types The question is of course. LCD controller. CAN controller. Vi Microsystems Pvt.. There are lots of converters with different resolutions. there is a great variety of component. the polarities are reversed. The permitted number of write accesses is 1 million cycles for most components. There are also a few SPI flash memories. If it should become necessary to use the other polarity. which can only be slaves. transitions are reversed. However data is put on the data line already at the falling edge in order to stabilize. amplifier) In the three categories converters. CPHA = 0. work with this configuration. USB controller. pressure) • Others (signalmixer. CPOL = 1 rising edge. Clock frequencies up to 3MHz.ViARM-2378 DEVELOPMENT BOARD If the phase of the clock is zero. By cascading memory devices any number of bits/word can be obtained. The data retention time duration from 10 years to 100 years. clock frequencies and number of channels to choose from. Serial EEPROMS SPI are available for different supply voltages (2. Most RTCs come from DALLAS and EPSON. There is also a great variety of RTCs with supply voltages from 2. In addition to the standard functions of a "normal" clock. Ltd.0V. Note While we using SPI Interface close the jumpers J12 to J15 as downward direction.. Only a temperature and a pressure sensor could be found. Vi Microsystems Pvt. non-volatile RAM etc. CAN and USB controllers with SPI make it easier to use these protocols on a micro controller and interfacing a LCD via SPI saves the troublesome parallel wiring.ViARM-2378 DEVELOPMENT BOARD RTCs are ideally suited for serial communication because only small amounts of data have to be transferred. some RTCs offer an alarm function. The group of the sensors is yet weakly represented. [ 42 ] . The data rate is limited to 250 kbps in the global 2. 20 kbps in the 868 MHz band used in Europe. Within the broad organization of the Institute of Electrical and Electronics Engineers (IEEE). Ltd. There is exactly one ZigBee coordinator in each network since it is the device that started the network originally. 15. which was created specifically for control and sensor networks.ViARM-2378 DEVELOPMENT BOARD 26. Medical (ISM) band. It is able to store information about the network. based on the IEEE 802. This standard was created by an organization known as the ZigBee Alliance. low data is (20-250 kbps).4 GHz Industrial. and Task Group 4 drafted the 802. the 802 group is the section that deals with network operations and technologies.15. and 40 kbps in the 915 MHz band used in North America and Australia. Group 15 works more specifically with wireless networking. addressing remote monitoring and control for sensory network applications. ZigBee Router (ZR) As well as running an application function a router can act as an intermediate router. DEVICE TYPES There are three different types of ZigBee device: ZigBee coordinator(ZC) The most capable device. passing data from other devices. the coordinator forms the root of the network tree and might bridge to other networks. [ 43 ] . Scientific.4 standard. The rate is depending on band. ZIGBEE ZigBee is a technological standard. Zigbee main features are low data rate.4 standard for a low data rate wireless personal area network (WPAN). including acting as the Trust Centre & repository for security keys. which is composed of a large number of companies and industry leaders striving to enable such control devices based on said standard. The standard for this WPAN specifies not only a low data rate but also low power consumption and low complexity. Vi Microsystems Pvt. The ZigBee standard is built on top of this IEEE standard. low power consumption and small packet device. among other things.. and therefore can be less expensive to manufacture than a ZR or ZC. is aware of all the nodes within its network. A ZED requires the least amount of memory. which usually only serve as devices that interact with the physical world. so that if one node goes down. Ltd. including star. mesh. or as devices that interact with the physical world. Other Full Function Devices (FFD's) may be found in the network. The figure given later introduces the concept of the ZigBee network topology. The final device found in these networks is the Reduced Function Device (RFD).ViARM-2378 DEVELOPMENT BOARD ZigBee End Device (ZED) Contains just enough functionality to talk to its parent node (either the coordinator or a router). devices can find an alternative path to communicate with one another. it cannot relay data from other devices. Vi Microsystems Pvt. A network coordinator is a device that sets up the network. network routers. This relationship allows the node to be asleep a significant amount of the time thereby giving you the much quoted long battery life. and manages both the information about each node as well as the information that is being transmitted/received within the network. [ 44 ] . That node can then be a part of a larger mesh network that ultimately communicates with the network coordinator.. As can be seen.4 functions. star topology is most useful when several end devices are located close together so that they can communicate with a single router node. and cluster tree. Mesh networking allows for redundancy in node links. and these devices support all of the 802.15. Every ZigBee network must contain a network coordinator. Star and mesh networking are both shown in the figure above. Several topologies are supported by ZigBee. Given below provide an example of how mesh networking allows for multiple paths between devices. HOW ZIGBEE WORKS ZigBee basically uses digital radios to allow devices to communicate with one another. A typical ZigBee network consists of several types of devices. They can serve as network coordinators. 4 systems • ZigBee® systems • Home/building automation • Industrial Control and Monitoring • Low power wireless sensor networks • PC peripherals • Set-top boxes and remote controls • Consumer Electronics Vi Microsystems Pvt.. [ 45 ] .4 GHz IEEE 802. Ltd.15.ViARM-2378 DEVELOPMENT BOARD ABOUT CC2431… Applications • 2. with 32/64/128 KB of flash memory respectively. 8 KB RAM and many other powerful features.ViARM-2378 DEVELOPMENT BOARD Description The CC2431 comes in three different flash versions: CC2431F32/64/128.. TX:27 mA.5 μA current consumption in power down mode. where external interrupts or the RTC can wake up the system o 0. Ltd. microcontroller running at 32 MHz) Only 0.6V) Vi Microsystems Pvt. Combined with the industry leading ZigBee® protocol stack (ZStack™) from Texas Instruments.15. [ 46 ] . Key Features * RF/Layout 2.15. The CC2431 is highly suited for systems where ultra low power consumption is required. 32/64/128 KB flash memory.3 μA current consumption in stand-by mode. The CC2431 is a true System-on-Chip (SoC) solution specifically tailored for IEEE 802.4 and ZigBee® applications.3. Short transition times between operating modes further ensure low power consumption.0V . where external interrupts can wake up the system Very fast transition times from low-power modes to active mode enables ultra low average power consumption in low duty cycle systems Wide supply voltage range (2. the CC2431 provides the market’s most competitive ZigBee® solution. It enables ZigBee® nodes to be built with very low total bill-ofmaterial costs.4 GHz IEEE 802. The CC2431 combines the excellent performance of the leading CC2420 RF transceiver with an industry-standard enhanced 8051 MCU. This is ensured by various operating modes.4 compliant RF transceiver (industry leading CC2420 radio core) Excellent receiver sensitivity and robustness to interferers Very few external components Only a single crystal needed for mesh network systems RoHS compliant 7x7mm QLP48 package * Low Power Low current consumption (RX: 27 mA. 4 KB with data retention in all power modes Powerful DMA functionality Watchdog timer One IEEE 802.ViARM-2378 DEVELOPMENT BOARD * Micro controller High performance and low power 8051microcontroller core 32. [ 47 ] .4 MAC timer. Digital RSSI / LQI support Battery monitor and temperature sensor 12-bit ADC with up to eight inputs and configurable resolution AES security coprocessor Two powerful USARTs with support for several serial protocols 21 general I/O pins. one general16-bit timer and two 8-bit timers Hardware debug support * Peripherals CSMA/CA hardware support.15. Ltd.. 64 or 128 KB in-system programmable flash 8 KB RAM. two with 20mA sink/source capability Vi Microsystems Pvt. CC2431DK content The development kit contains the following: • • • • • • • • 2 x SmartRF04EB 10 x SOC_BB (Battery Board) 2 x Evaluation Modules CC2431EM 10 x Evaluation Modules CC2431EM 12 x 2. The sample application allows you to: • Evaluate the SmartRF®04 products. The radio can be easily configured to measure sensitivity. All I/O ports are available on pin connectors on the edge of the board to allow easy access for testing or for external I/O. [ 48 ] . output power and other RF parameters.4GHz Antennas 2 x USB cables 1 x RS232 Serial cable 1 x 10-wire flat cable for using SmartRF04EB as emulator for external target systems • 1 x Quick start guide The SmartRF04DK Development Kit includes a sample application for location calculation and demonstration.. • Develop and test your own firmware. Ltd. Apply power the boards and the plug and play kit can be used for range testing and location engine testing • Use SmartRF® Studio to perform RF evaluation and measurements. The CC2431DK includes a USB interface that can be used as an emulator interface for the CC2431 or CC2431. SWRU07 Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD DESCRIPTION OF CC4321 DEVELOPMENT KIT 1. Vi Microsystems Pvt. System overview Figure 1: Location Estimation The location algorithm used in CC2431 Location Engine is based on RSSI (Received Signal Strength Indicator) values. hence the algorithm is decentralized. The CC2431 Location Engine can only handle two dimensions. be named X and Y.e. to represent levels in a building). please refer to application note AN042 for a description of each parameter. The point named (X. The main feature of the CC2431 Location Engine is that the location estimation is performed in each Blind Node. in the following. In addition it needs two RF transmission parameters (A and N). The RSSI value will decrease with increasing distance. since only the calculated position is transmitted. a two dimensional grid is used.. This is specific to our transceiver and is provided in the datasheet.1 Grid To map each location to a distinct place in the natural environment. 2. [ 49 ] . The data that is necessary to do a calculation are X. This reduces the amount of data transferred on the RF interface. The location engine implemented in CC2431 can use up to 16 Reference Nodes for each calculation. 0) is located in upper left corner of the grid. Y and RSSI values for each of the Reference Nodes used in the system setup. but it’s possible to handle a third dimension in software (i. The direction will. An important parameter related to the performance of the location estimate is the absolute tolerance of the RSSI measurement of the RF-transceiver. Ltd.ViARM-2378 DEVELOPMENT BOARD 2. Y) = (0. Vi Microsystems Pvt. The Z-location Engine can also configure any Blind Node to automatically make a periodic position calculation and report (by default the Blind Node is waiting for a command to perform a position calculation. 2. 2. Ltd. The figures are simplified.4 Program flow The program flow for both Reference Node and Blind Node are shown in Figure 2 and Figure 3. The main task for a Reference Node is to provide “reference” packets to the Blind Node. -40 dBm is approximately the measured signal strength on distance of one meter.1 Reference Node A node which has static location is called a Reference Node.2 Blind Node A Blind Node will communicate with its nearest Reference Nodes.2.3 RSSI The RSSI value is typically in the range -40 dBm to -90 dBm. 2. Experiments have shown that one Reference Node for each 100 m2 gives good location estimates. collecting X. where 40 is the highest signal strength.3 Dongle The Dongle will communicate with the entire network.2. so the range will typically be from 40 to 90.Y values of all Reference Nodes and the A and N values of the Blind Nodes via the Z-location Engine PC Application.. Reference packets contain the X and Y coordinates of the Reference Node.) 2. Then it uses the location engine hardware to calculate its position based on the collected parameters from several Reference Nodes. This node must be configured with an X and a Y value that correspond to the physical location. but a node can only calculate its position if it is within range of at least three Reference Nodes1. Any number of Reference Nodes can be used in the system. Input to the location engine hardware is the absolute value of the RSSI in dBm.2. it can request or configure the X. [ 50 ] . Y and RSSI values for each of these nodes. 2.ViARM-2378 DEVELOPMENT BOARD 2. where -40 dBm is the highest value.2 Nodes The CC2431 Location Engine uses the RSSI value combined with the physical location of the Reference Nodes to calculate its own position. The nodes should be placed in a grid with one node for each 10 meters in both directions. Data Collecting Phase After the broadcast phase. Ltd.. Vi Microsystems Pvt. the Over-the-Air (OTA) message traffic can be observed as three phases: broadcast. data collection. the Blind Node will send a 1-hop unicast message to every Reference Node in radio range requesting the average RSSI calculated during the broadcast blast.5 Blind Node Communication Flow The Z-location Engine is configured to periodically query the entire network – the X. and any Reference Node receiving such a message shall make a running average of the RSSI of the packets received from a particular Blind Node. [ 51 ] . Position Calculating Phase In this phase the Blind Node calculates the position and transmits it to the Dongle. Broadcast Phase The Blind Node sends out a 1-hop broadcast to learn the network address of all Reference Nodes that are within radio range. Then the Blind Node sends out a blast of several 1-hop broadcast messages. & position calculation and reporting. When a Blind Node performs a position calculation. Note : While we are zigbee close the jumpers J22 to J25 as upward direction.Y of all Reference Nodes is requested and all Blind Nodes are commanded to perform a position calculation.ViARM-2378 DEVELOPMENT BOARD Reference Node 2. RX. These features are as follows: 96 x 64 pixel resolution. OLED Interface 1. The organic films consist of a hole-injection layer. No backlighting with near 180° viewing angle. Figures below show some of the graphics capability of the μOLED. a hole-transport layer.3V to 6. Active Display Area: 20mm x 14mm. The μOLED is a compact & cost effective all in one ‘SMART” OLED Display with an embedded graphics controller that will deliver ‘stand-alone’ functionality to your project. Ltd. TX. which require backlighting. current @ 40mA nominal when using a 5. Introduction Short for organic light-emitting diode. 2. The ‘simple to use’ embedded commands not only control background color but can produce text in a variety of sizes as well as draw shapes (which can include user definable bitmapped characters such as logos) in 256 or 65. Note: The module may need to be supplied with a voltage greater than 4. GND. When voltage is applied to the OLED cell. RESET Voltage supply from 3.they emit light rather than modulate transmitted or reflected light. Enhanced OLED screen. OLED displays are emissive devices .536 colors whilst freeing up the host processor from the ‘processor hungry ‘ screen control functions. usually being glass.0 volts when using it with a SD memory card. [ 52 ] .0V.. the injected positive and negative charges recombine in the emissive layer and create electro luminescent light. an emissive layer and an electron-transport layer. one a metallic cathode and one a transparent anode.ViARM-2378 DEVELOPMENT BOARD 27. Vi Microsystems Pvt.0 x 4. a display device that sandwiches carbon-based films between two charged electrodes. This means a simple micro controller with a standard serial or USB interface can drive the μOLED module with total ease. μOLED Features The μOLED is aimed at being integrated into a variety of different applications via a wealth of features designed to facilitate any given functionality quickly and cost effectively and thus reduce ‘time to market’. 256 or 65K true to life colors.9mm. Easy 5 pin interface to any host device: VCC.0V supply source.7 x 23. 0. Unlike LCDs.96” diagonal. Module Size: 32. IMAGE. Three selectable font sizes (5x7. circles. TEXT. BACKGROUND COLOUR. Powered by the 4D-LABS GOLDELOX processor (also available as separate OEM chips for volume users). etc. μOLED Serial Command Set The heart of the μOLED-96-G1 is the easy to understand command set..ViARM-2378 DEVELOPMENT BOARD Serial RS-232 (0V to 3. images. just to name a few 3.3V) with auto-baud feature (300 to 256K baud). a series resistor (100 to 220 Ohms) is required on the RX line. CIRCLE. If interfacing to a system greater than 3. 8x8 and 8x12) for ASCII characters as well as user defined bitmapped characters (32 @ 8x8) Built in graphics commands such as: LINE. Ltd.3V levels. If interfacing to a host system running at voltages greater than 3. RECTANGLE.6V supply. USER BITMAP. This comprises of a handful of easy to learn instructions that can draw lines. then a 100 to 220 Ohms series resistor must be inserted between the Host TX and the μOLED RX signals as shown in the diagram below. etc. The command set is grouped into 3 sections: • General Command Set • Display Specific Command Set • Extended Command Set Each Command set is described in detail in the following sections. etc.6V levels. Optional USB to Serial interface via the 4D micro-USB (μUSB-MB5 or μUSB-CE5) modules. [ 53 ] . animations. NOTE! The RX and the TX signals are at 3. 64Mb to 4Gig μSD memory cards can be purchased separately. Onboard micro-SD (μSD) memory card adaptor for storing of icons. PUT PIXEL. to provide a full text and graphical user interface. Vi Microsystems Pvt. squares. The commands are sent to the μOLED-96-G1 via its serial connection (5 pin header). colour(msb:lsb). Due to the high colour depth of the μOLED. NOTE: When transmitting the command and data bytes to the μOLED. This format is called the big endian. do not include any separators such as commas ‘. Please note that all command examples listed below are in hex (00hex). Vi Microsystems Pvt.’ or spaces ‘ ‘ or brackets ‘(‘ ‘)’ between the bytes. a pixel colour value will not fit into a single byte. these must not be included when transmitting data to the μOLED. a byte can only hold a maximum value of 255. The μOLED will reply back with a NAK for each invalid command it receives.ViARM-2378 DEVELOPMENT BOARD 4. If the μOLED receives a command that it does not understand it will reply back with a negative acknowledge called the NAK (15hex). the μOLED will reply back with a single acknowledge byte called the ACK (06hex). This tells the host that the command was understood and the operation is completed. It will take the μOLED anywhere between 1 to several milliseconds to reply back with an ACK..(3Fhex). Ltd. When a command is sent. If a command that has 5 bytes but only 4 bytes are sent. For correct operation make sure the command bytes are sent in the correct sequence. depending on the command and the operation the μOLED has to perform. There is no timeout on the μOLED when incomplete commands are sent. The most significant byte (msb) is transmitted first followed by the least significant byte (lsb). Therefore the colour is represented as a 2 byte value. [ 54 ] . The examples show these separators purely for legibility. the command will not be executed and the μOLED will wait until another byte is sent before trying to execute the command. So for a 2 byte colour value of 013Fhex the byte order can be shown as (01hex). Command Protocol The following are each of the commands with the correct syntax. ……. 1111111111111111bin Description : This command sets the current background colour. data1 to dataN : Number of data bytes that make up the composition and format of the bitmapped character. 18hex. 5. data2.. Set Background Colour (B) Syntax : cmd : colour(msb:lsb) : cmd. 24hex. Vi Microsystems Pvt. 18hex This adds and saves user defined 8x8 bitmap as character number 1 into memory as seen below. 01hex.ViARM-2378 DEVELOPMENT BOARD 5. Bascii pixel colour value: 2 bytes (16 bits) msb:lsb 65. Ltd. 81hex. The 8x8 bitmap composition is 1 byte wide (8bits) by 8 bytes deep which makes N = 1x8 = 8. Any other object on the screen with a different colour value will not be affected. Example : 42hex. colour(msb:lsb) 42hex.535dec. 42hex. dataN 41hex. 32 characters of 8x8 format. 81hex. Add User Bitmapped Character (A) Syntax cmd char# : : : cmd.535 (white). 42hex.. only the background colour will change. char#. Once this command is sent. 0dec White = FFFFhex. [ 55 ] . data1.536 colours to choose from Black = 0000hex. General Command Set 5. Description: Example1: 41hex. 65.. 24hex.1. FFFFhex Set the background colour to value 65. This command will add a user defined bitmapped character into the internal memory. Aascii bitmap character number to add to memory: 0 to 31 (00h to 1Fh).2. 0 = Button Down (pressed) 1 = Button Up (not pressed) x : top left horizontal start position of the button y : top left vertical start position of the button buttonColour(msb:lsb) : 2 byte button colour value font : 0 = 5x7 font. y) refers to the top left corner of the button and the size of the button is automatically calculated and drawn on the screen with the text relatively justified inside the button box. Vi Microsystems Pvt. 2 = 8x12 font. effects the width of the button.. state. . charN.. effects the height of the button.ViARM-2378 DEVELOPMENT BOARD 5. terminator Text cmd : 62hex. textColour(msb:lsb) : 2 byte text colour value textWidth : horizontal size of the character. char1. textHeight.. font. This has precedence and does not affect the Font command.charN : string of ASCII characters (limit the string to line width) terminator : the string must be terminated with 00hex Description : This command will place a Text button similar to the ones used in a PC Windows environment. Ltd. buttonColour(msb:lsb). [ 56 ] . Colour(msb:lsb). char1. Separate button and text colours provide many variations in appearance and format.. x. textHeight : vertical size of the character.3 Text button (b) Syntax : cmd. y. (x. bascii state : Specifies whether the displayed button is drawn as UP (not pressed) or DOWN (pressed). 1 = 8x8 font. textWidth. The button can be displayed in an UP (button not pressed) or DOWN (button pressed) position by specifying the appropriate value in the state byte. x. 20hex. Cascii x : circle centre horizontal position. 10hex.4 Draw Circle (C) Syntax : cmd. 20hex. 0dec to 63dec (00hex to 37Fhex). Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD 5. 0dec to 95dec (00hex to 5Fhex). 00hex. colour(msb:lsb) : 2 byte circle colour value Description : This command will draw a coloured circle centred at (x. rad. Pen Size = 1 circle is wire frame. [ 57 ] . Example : 43hex. Ltd. 0dec to 63dec (00hex to 3Fhex).. The circle can be either solid or wire frame (empty) depending on the value of the Pen Size (see Set Pen Size command). rad : radius size of the circle. y : circle centre vertical position. When Pen Size = 0 circle is solid. y. 1Fhex Draws a RED circle (001Fhex) centred at x = 32dec (3Fhex) and y = 32dec (3Fhex) with a radius of 16dec (20hex). y) with a radius determined by the value of rad. colour(msb:lsb) cmd : 43hex. Vi Microsystems Pvt. xs. implementing a windowing system or copying patterns across the screen to make borders or tiles. yd. Ltd. width. smooth scrolling. cascii xs: top left horizontal start position of block to be copied (source) ys: top left vertical start position of block to be copied (source) xd: top left horizontal start position of where copied block is to be pasted (destination) yd: top left vertical start position of where the copied block is to be pasted (destination) width: width of block to be copied (source) height: height of block to be copied (source) Description : This command copies an area of a bitmap block of specified size.5 Block copy & Paste (Screen Bitmap Copy) (c) Syntax : cmd. yd (top left corner).ViARM-2378 DEVELOPMENT BOARD 5.. height cmd : 63hex. [ 58 ] . The start location of where the block is to be pasted (destination) is represented by xd. ys (top left corner) and the size of the area to be copied is represented by width and height parameters. xd. The start location of the block to be copied is represented by xs. This is a very powerful feature for animating objects. ys. of 8x8 format. 00hex. Ltd. 10hex.6 Display User Bitmapped Character (D) Syntax : cmd. 00hex. 07hex. Dascii char# : which user defined character number to display from the selected group. 0dec to 31dec (00hex to 1Fhex). y = 0. colour = green Example 3: 44hex .ViARM-2378 DEVELOPMENT BOARD 5. x. 08hex.. 00hex Display 8x8 bitmap character number 1 at x = 0. y. y = 0. 01hex. y : vertical display position of the character. [ 59 ] . x : horizontal display position of the character. E0hex Display 8x8 bitmap character number 1 at x = 8. colour(msb:lsb) cmd : 44hex. y) on the screen. 1Fhex Display 8x8 bitmap character number 1 at x = 16. colour = blue Vi Microsystems Pvt. 00hex. 01hex. 0dec to 63dec (00hex to 3Fhex). 0dec to 95dec (00hex to 5Fhex). User defined bitmaps allow drawing & displaying unlimited graphic patterns quickly & effectively. colour = red Example 2: 44hex. 01hex . y = 0. F8hex. char#. colour(msb:lsb) : 2 byte bitmap colour value Description : This command displays the previously defined user bitmapped character at location (x. 00hex. Example 1: 44hex. 00hex. 02hex Select large 8x12 fonts Vi Microsystems Pvt. size cmd : 46hex. 5. Example1: 46hex.ViARM-2378 DEVELOPMENT BOARD 5. Any character on the screen with the old font size will remain as it was. Fascii size : = 00hex : 5x7 small size font = 01hex : 8x8 medium size font = 02hex : 8x12 large size font Description : This command will change the size of the font according to the value set by size. Eascii Description : This command clears the entire screen using the current background colour.7 Erase Screen (E) Syntax : cmd cmd : 45hex.. 00hex Select small 5x7 fonts Example1: 46hex. Changes take place after the command is sent. [ 60 ] .8 Set Font Size (F) Syntax : cmd. Ltd. 01hex Select medium 8x8 fonts Example1: 46hex. Example : 45hex Clear the screen. .. (xn.e. x3. y2. y3.. i. Vi Microsystems Pvt. Gascii x1. Specifies the number of vertices of the polygon. . x1. x2. 5. colour(msb:lsb) cmd : 67hex. (x1. y1) .9 Draw TrianGle (G) Syntax : cmd. These can be specified in any fashion. y2. [ 61 ] . yn) : vertices of the polygon. . y1.. x2 < x1. xn. i. . A solid or a wire frame triangle is determined by the value of the Pen Size setting.. y3 > y1. yn. y1. 0 = solid. 1 = wire frame.. y2 > y1. x2. . vertices. . g ascii vertices : number of vertices from 3 to 7. colour(msb:lsb) cmd : 47hex. y3 : 3 vertices of the triangle. The vertices must be specified in an anti-clock wise manner. Ltd. x3. x3 > x2.. colour(msb:lsb) : 2 byte polygon colour value Description : This command draws an Empty/Wire Frame polygon. colour(msb:lsb) : 2 byte triangle colour value Description : This command draws a Solid/Empty triangle.ViARM-2378 DEVELOPMENT BOARD 5..10 Draw Polygon (g) Syntax : cmd. These must be specified in an anticlockwise fashion. x1. Currently only a wire frame polygon is supported.. Up to 7 vertices can be specified in any manner. y1.e. colourMode. y) and size of the image specified by width and height parameters. Ltd. [ 62 ] . .. x. y location of each pixel.pixelN : image pixel data and N is the total number of pixels N = height x width when colourMode = 8 N = height x width x 2 when colourMode = 16 Description : This command displays a bitmap image on to the screen with the top left corner specified by (x. 8bits/1byte per pixel 16dec = 65K colour mode. 16bits/2bytes per pixel (msb:lsb) pixel1. Iascii x : Image horizontal start position (top left corner) y : Image vertical start position (top left corner) width : horizontal size of the image height : vertical size of the image colourMode : 8dec = 256 colour mode. height.. pixelN cmd : 49hex. Vi Microsystems Pvt.11 Display Image (I) Syntax : cmd. y. This command is more effective than using the “Put Pixel” command. where there are no overheads in specifying the x..ViARM-2378 DEVELOPMENT BOARD 5. width. pixel1. objects behind text is blocked by background Description : This command will change the attribute of the text so that an object behind the text can either be blocked or transparent. y1) to point (x2. 5Fhex. 0dec to 95dec (00hex to 5Fhex). y1 : vertical position of line start. 0dec to 63dec (00hex to 3Fhex). y2. 0dec to 63dec (00hex to 3Fhex). FFhex. 5. y1=0) to (x2=95. 3Fhex. Oascii mode : = 00hex : Transparent Text. x2. 00hex.13 Opaque / Transparent Text (O) Syntax : cmd. y2 : vertical position of line end. it will either write just the character alone (Transparent Mode) so any original character will be seen as well as the new. objects behind the text can be seen. 0dec to 95dec (00hex to 5Fhex). Lascii x1 : horizontal position of line start. or overwrite any existing data with the new character. = 01hex: Opaque Text. 01hex Opaque Text Mode Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD 5. x2 : horizontal position of line end. This command will change the attribute so that when a character is written. colour(msb:lsb) cmd : 4Chex. [ 63 ] . 00hex. y2) on the screen. mode cmd : 4Fhex. y2=63). Example1: 4Fhex. Changes take place after the command is sent. x1. 00hex Transparent Text Mode Example2: 4Fhex. colour(msb:lsb) : 2 byte line colour value Description : This command will draw a coloured line from point (x1. Example : 4Chex. y1. Ltd..12 Draw Line (L) Syntax : cmd. Ffhex Draws a white line from (x1=0. [ 64 ] . Ffhex Puts a white (FFFFhex) pixel at location x = 01dec (01hex) and y = 10dec (0Ahex). size cmd : 70hex. 0Ahex. 0dec to 127dec (00hex to 7Fhex). y : vertical pixel position. 1111111111111111bin Description : This command will put a coloured pixel at location (x. y. colour : pixel colour value: 2 bytes (16 bits) msb. etc are solid = 01hex : All objects are wire frame (empty) Description : This command determines if certain graphics objects are drawn in solid or wire frame fashion. Vi Microsystems Pvt. rectangles. Pascii x : horizontal pixel position. lsb 65. x.536 colours to choose from Black = 0000hex. FFhex. colour(msb:lsb) cmd : 50hex. 65.14 Put Pixel (P) Syntax : cmd. triangles.. 0dec to 127dec (00hex to 7Fhex). 0dec White = FFFFhex. 01hex All objects will be drawn wire frame. Example1 : 70hex.15 Set pen Size (p) Syntax : cmd.535dec. y) on the screen. p ascii size : = 00hex : All objects such as circles.ViARM-2378 DEVELOPMENT BOARD 5. 01hex. Example : 50hex. 00hex All objects will be drawn solid Example1 : 70hex. Ltd. 5. y : vertical pixel position. 1Fhex Reads a blue (001Fhex) pixel at location x = 1dec (01hex) and y = 1dec (01hex). [ 65 ] . 01hex. 0dec to 95dec (00hex to 5Fhex). 01hex μOLED reply : 00hex. y cmd : 52hex. y) on the screen and return it to the host..ViARM-2378 DEVELOPMENT BOARD 5. Ltd. Vi Microsystems Pvt. Rascii x : horizontal pixel position. This is a useful command when for example a white pointer is moved across the screen and the host can read the colour on the screen and switch the colour of the pointer when it’s on top of a light coloured area. 0dec to 63dec (00hex to 3Fhex). Description : This command will read the colour value of pixel at location (x.16 Read Pixel (R) Syntax : cmd. x. Example : 52hex. y2 : bottom right vertical end position. y2 refers to the bottom right hand corner of the rectangle on the screen. 10hex. 00hex. y1=0 and its bottom right corner at x2=16. 0dec to 95dec (00hex to 5Fhex). [ 66 ] . x1. Vi Microsystems Pvt. If colour is chosen to be that of the background then the effect will be erasure. If Pen Size value was previously set to 0 rectangle will be solid. 00hex. 0dec to 63dec (00hex to 3Fhex). r ascii x1 : top left horizontal start position of rectangle. Example : 70hex. 0dec to 63dec (00hex to 3Fhex).. 10hex. y2.17 Draw rectangle (r) Syntax : cmd. Ltd. y1 refers to the top left corner of the area and x2. 0dec to 95dec (00hex to 5Fhex). 00hex. x2. 1Fhex Draws a RED (001Fhex) rectangle that has its top left corner at x1=0. x2 : bottom right horizontal end position.ViARM-2378 DEVELOPMENT BOARD 5. y2=16. colour(msb:lsb) cmd : 72hex. y1. otherwise wire frame if value was 1. x1. y1 : top left vertical start position of rectangle . colour(msb:lsb) : 2 byte rectangle colour value Description : This command will draw a rectangle of specified area on the screen. 2 = 8x12 font. This has precedence over the Font command but does not effect the previous font selection. height. Ltd. x. The string must be terminated with 00hex. width. The sizes of the characters are determined by the width and height parameters. a wrap around will occur on to the next line. y : the vertical start position of string (in pixels). [ 67 ] . m x normal size char1. .ViARM-2378 DEVELOPMENT BOARD 5. char1. colour(msb:lsb). 1 = 8x8 font... colour(msb:lsb) : 2 byte colour value of the string. charN. n x normal size height : vertical size of the string characters. font. Vi Microsystems Pvt.charN : string of ASCII characters (max 256 characters) terminator : the string must be terminated with 00hex Description : This command allows the display of a string of bitmapped (unformatted) ASCII characters. y.18 Place String of Ascii Text (unformatted) (S) Syntax : cmd. Maximum string length is 256 bytes. Terminator cmd : 53hex. The horizontal start position of the string is specified by x and the vertical position is specified by y. Sascii x : the horizontal start position of string (in pixels).. font : 0 = 5x7 font. . width : horizontal size of the string characters. If the length of the string is longer than the maximum number of characters per line then. sascii column : horizontal start position of string: 0 . column. row : vertical start position of string: 0 . 2 = 8x12 font... The horizontal start position of the string is specified by column and the vertical position is specified by row. [ 68 ] . Maximum string length is 256 bytes. row.7 for 5x7 and 8x8 font. Vi Microsystems Pvt. font.. char1. colour(msb:lsb). This has precedence over the Font command.. charN.ViARM-2378 DEVELOPMENT BOARD 5. 1 = 8x8 font. char1. If the length of the string is longer than the maximum number of characters per line then. Ltd.charN : string of ASCII characters (max 256 characters) terminator : the string must be terminated with 00hex Description : This command allows the display of a string of ASCII characters.11 for 8x8 and 8x12 font. terminator cmd : 73hex. 0 .. 0 – 4 for 8x12 font. a wrap around will occur on to the next line.15 for 5x7 font. The string must be terminated with 00hex. font : 0 = 5x7 font.19 Place string of Ascii Text (formatted) (s) Syntax : cmd. colour(msb:lsb) : 2 byte colour value of the string. namely 0 to 15 columns by 0 to 7 rows.ViARM-2378 DEVELOPMENT BOARD 5. 0 . Example : 54hex.11 for 8x8 and 8x12 font. Ffhex Place character ‘A’ (41hex) at column = 0. row : vertical position of character: 0 . Vi Microsystems Pvt. 0 – 4 for 8x12 font.7 for 5x7 and 8x8 font.20 Place Text Character (formatted) (T) Syntax : cmd. colour(msb:lsb) cmd : 54hex.15 for 5x7 font. see range below: 0 . FFhex. column. 41hex. Tascii char : inbuilt standard ASCII character. colour(msb:lsb) : 2 byte colour value of the character. Description : This command will place a coloured ASCII character (from the ASCII chart) on the screen at a location specified by (column.535). 00hex.. row. char. Ltd. row). row = 0. The position of the character on the screen is determined by the predefined horizontal and vertical positions available. colour = white (65. 32dec to 127dec (20hex to 7Fhex) column : horizontal position of character. 00hex. [ 69 ] . The font of the character is determined by the ‘Font Size’ command. y). width. x. y. y : the vertical position of character (in pixel units). Unlike the ‘T’ command. this option allows text of any size (determined by width and height) to be placed at any position.. colour(msb:lsb) : 2 byte colour value of the character. height cmd : 74hex. tascii char : inbuilt standard ASCII character. width : horizontal size of the character.21 Place text Character (unformatted) (t) Syntax : cmd.ViARM-2378 DEVELOPMENT BOARD 5. colour(msb:lsb). 32dec to 127dec (20hex to 7Fhex) x : the horizontal position of character (in pixel units). m x normal size Description : This command will place a coloured built in ASCII character anywhere on the screen at a location specified by (x. [ 70 ] . Ltd. n x normal size height : vertical size of the character. Vi Microsystems Pvt. char. If a Power-Down command has been issued and Power is not switched off. the Power-Up command can be sent to Power the display back up again. This is only retained for legacy. This command need not only be issued to shutdown but can be issued to conserve power by turning off the display and the backlight. mode. The Power-Up command does not need to be executed when applying power. the OLED display maybe damaged (over a period of time). value = 0dec to 15dec : Contrast range (default = 15dec) mode : = 03hex : OLED POWER-UP/POWER-DOWN. [ 71 ] . value = XXhex: has no effect as there is no backlighting on the OLED display. value = 00hex: Display OFF = 01hex: Display ON mode : = 02hex : OLED CONTRAST. value = 00hex: OLED Power-Down = 01hex: OLED Power-Up Note: It is important that the μOLED be issued with the Power-Down command before switching off the power. Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD 5. Yascii mode : = 00hex : BACKLIGHT CONTROL. value cmd : 59hex. If the power is removed without issuing this command. This command switches off the internal voltage boosters and current amplifiers and they need to be turned off before main power is removed. Ltd. This command also turns off the display.22 OLED DisplaY Control Functions (Y) Syntax : cmd. mode : = 01hex : DISPLAY ON/OFF.. . Description : This command requests all the necessary information from the module about its characteristics and capability.23 Version/Device Info Request (V) Syntax : cmd. hardware_rev. See horizontal_res above for resolution options.ViARM-2378 DEVELOPMENT BOARD 5. 02hex = micro-VGA. 22hex : 220 pixels 28hex : 128 pixels 32hex : 320 pixels 60hex : 160 pixels 64hex : 64 pixels 76hex : 176 pixels 96hex : 96 pixels vertical_res : this response indicates the vertical resolution of the display. 01hex = micro-LCD. firmware_rev : this response indicates the device firmware version. 00hex = micro-OLED. hardware_rev : this response indicates the device hardware version. Ltd. output Response : device_type. vertical_res cmd : 56hex. firmware_rev. 01hex : outputs the version and device info to the serial port as well as to the screen. Vascii output : 00hex : outputs the version and device info to the serial port only. horizontal_res. Vi Microsystems Pvt. device_type : this response indicates the device type. horizontal_res : this response indicates the horizontal resolution of the display. [ 72 ] . The Display Specific Command set utilises these built in hardware features directly. Display Scroll Control ($S) Syntax : spCmd. 1 = Enable 0x01 Reserved XXX 0x02 (Scroll Speed) 1 = fast. register data 0x00 (Scroll Enable/Disable) 0 = Disable. Display Specific Command Set Different OLED display panels that are used in the μOLED range of intelligent display modules have certain built in features that are controlled directly by the embedded driver controller. Description : This command allows control of screen scrolling. These features otherwise would be too cumbersome to implement in firmware and would require resources that are not available. 2 = normal.. Sascii reg : Scroll Control Register. These are detailed in this section. Vi Microsystems Pvt. $ascii cmd : 53hex. Ltd. data spCmd : 24hex. Refer to above for detail.ViARM-2378 DEVELOPMENT BOARD 6. register. cmd. Display Specific Command Set 1. [ 73 ] . 3 = slow data : Scroll register data. Vi Microsystems Pvt.. Extended Command Set The following commands are related to the μOLED-96-G1 extended command set and they are described in this section. etc. width. 7. Ltd. The μOLED-96-G1 has an integrated micro-SD (μSD) memory card adaptor and can accept memory cards of any size from 64Mb up to 4Gig for storing of text. height spCmd : 24hex. movie clips and all other graphics objects. [ 74 ] . cmd. The idea of programming objects into the memory card is so that they can be automatically replayed back like a slide show without any host processor intervention. To utilise the Extended Command set. Dascii x : horizontal start position of screen area to dim (top left corner) y : vertical start position of screen area to dim (top left corner) width : horizontal size of the area to dim height : vertical size of the area to dim Description : This command allows a portion of the screen to be dimmed to achieve certain effects such as highlight control. Dim Screen Area ($D) Syntax : spCmd. images. icons.ViARM-2378 DEVELOPMENT BOARD 2. y. You will find references being made to “Objects” throughout this section. x. An object can be simply defined as those commands that reside inside the memory card (programmed/downloaded previously) and can be displayed on the screen by the “Display Object from Memory Card” command. These commands will return a NAK if executed live from the serial link. There are also some commands that can only reside inside the card and must be executed from there. a μSD memory card must be inserted into the module since all of these commands are based around the memory card. $ascii cmd : 44hex. animations. . Initialise Memory Card (@i) Syntax : extCmd. Once this command is sent. Description : This command provides a means of reading data back from the memory card in lengths of 512 bytes. cmd. It maybe useful in validating the data that was stored previously using the Write Sector command. Ltd.1.ViARM-2378 DEVELOPMENT BOARD 7. The memory card is always initialised upon Power-Up or Reset cycle. Rascii SectorAddress(hi:mid:lo): A 3 byte sector address. 7. @ascii cmd : 69hex.2.777. Each sector is 512 bytes in size. [ 75 ] . Vi Microsystems Pvt. Sector Address range from 0 to 16. i ascii Description : This command initialises the μSD memory card. SectorAddress(hi:mid:lo) extCmd : 40hex. If the card is inserted after the power up or a reset then this command must be used to initialize the card. Read Sector Data from Memory Card (@R) Syntax : extCmd. There are 2048 sectors per every 1Mb of card memory.215 depending on the capacity of the card. @ascii cmd : 52hex. if the card is present. the μOLED will return 512 bytes of data relating to that particular sector. cmd extCmd : 40hex. ViARM-2378 DEVELOPMENT BOARD 7.3. Write Sector Data to Memory Card (@W) Syntax : extCmd, cmd, SectorAddress(hi:mid:lo), data(1), .. , data(512) extCmd : 40hex, @ascii cmd : 57hex, Wascii SectorAddress(hi:mid:lo): A 3 byte sector address. Sector Address range from 0 to 16,777,215 depending on the capacity of the card. Each sector is 512 bytes in size. There are 2048 sectors per every 1Mb of card memory. data(1), .. , data(512): 512 bytes of sector data. The data length must be 512 bytes long. Unused bytes must be padded even if not all are used. Description : This command allows downloading of objects such as images and other commands for storage that can be retrieved and used later on. It can also be used as general purpose storage for user specific data. Downloads must always be limited to 512 bytes in length. For large objects such as images, the data must be broken up into multiple sectors (chunks of 512 bytes) and this command then maybe used many times until all of the data is written into the card. If the data block to be written is less than 512 bytes in length, then make sure the rest of the remaining data are padded with 00hex or FFhex (it can be anything). If only few bytes of data are to be written then the Write Byte command can be used. Once this command message is sent, the μOLED will take a few milliseconds to write the data into its memory card and at the end of which it will reply back with an ACK(06hex) if the write cycle was successful. If there was a problem in writing the data to the card a NAK(15hex) will be sent back without any write attempts. Only data(1) to data(512) are stored in the card. Other bytes in the command message such as Sector Address are not stored. Vi Microsystems Pvt. Ltd., [ 76 ] ViARM-2378 DEVELOPMENT BOARD 7.4. Read Byte Data from Memory Card (@r) Syntax : extCmd, cmd extCmd : 40hex, @ascii cmd : 72hex, r ascii Description : This command provides a means of reading a single byte of data back from the memory card. Before this command can be used the card memory address location must be set using the Set Memory Address command. Once this command is sent, the μOLED will return 1 byte of data relating to that memory location set by the memory Address pointer. The memory Address location pointer is automatically incremented to the next address location. 7.5. Write Byte Data to Memory Card (@w) Syntax : extCmd, cmd, data extCmd : 40hex, @ascii cmd : 77hex, w ascii data : 1 byte of memory card data. Description : This command allows writing single bytes of data to the memory card. This is useful for writing small chunks of data relating to graphics objects or user application specific data for general purpose storage. For large data blocks it is more efficient to use the Write Sector Data command described in the previous section. Before this command can be used the card memory address location must be set using the Set Memory Address command. Once this command is sent, the Μoled will write 1 byte of data relating to that memory location set by the memory Address pointer. The memory Address location pointer is automatically incremented to the next address location. Only the data byte is stored in the card. Other bytes in the command message are not stored. Vi Microsystems Pvt. Ltd., [ 77 ] ViARM-2378 DEVELOPMENT BOARD 7.6. Set Memory Address (@A) Syntax : extCmd, cmd, Address(Umsb:Ulsb:Lmsb:Llsb) extCmd : 40hex, @ascii cmd : 41hex, Aascii Address(Umsb:Ulsb:Lmsb:Llsb): A 4 byte memory card address for byte wise access. Description : This command sets the card memory Address pointer for byte wise reads and writes. After a byte read or write the Address pointer is automatically incremented internally to the next Address location. 7.7. Copy Screen to Memory Card (@C) Syntax : extCmd, cmd, x, y, width, height, SectorAddress(hi:mid:lo) extCmd : 40hex, @ascii cmd : 43hex, Cascii x : Screen horizontal start position (top left corner) y : Screen vertical start position (top left corner) width : horizontal size of the screen area to be copied height : vertical size of the screen area to be copied SectorAddress(hi:mid:lo): A 3 byte sector address where the copied screen area is to be stored. Description : This command copies an area of the screen of specified size. The start location of the block to be copied is represented by x, y (top left corner) and the size of the area to be copied is represented by width and height parameters. This is similar the Block Copy and Paste command but instead of the copied screen area being pasted to another location on the screen it is stored into the memory card. The stored screen image can then be later recalled from the memory card and redisplayed onto the screen at the same or different location by using the Display Image/Icon from Memory Card command. This is a very powerful feature for animating objects, smooth scrolling, or implementing a windowing system. Vi Microsystems Pvt. Ltd., [ 78 ] . the object start location must be at the start of a sector boundary. this will result in a corrupted image display.e. 16bits/2bytes per pixel SectorAddress(hi:mid:lo): A 3 byte memory card sector address of a previously stored Image or an Icon that is about to be displayed. Notes: The Copy Screen to Memory Card command always stores that part of the screen as a 16 bit image. cmd. width. colourMode. Iascii x : Screen horizontal start position (top left corner) y : Screen vertical start position (top left corner) width : horizontal size of the Image/Icon height : vertical size of the Image/Icon colourMode : 8dec = 256 colour mode. [ 79 ] . Ltd. SectorAddress(hi:mid:lo) x.8. i. The images or icons when stored into the memory card must be sector boundary aligned. @ascii cmd : 49hex. 2 bytes per pixel. Do not store an image/icon in one colour format then display it in another colour format. 8bits/1byte per pixel 16dec = 65K colour mode. extCmd : 40hex. i. Display Image/Icon from Memory Card (@I) Syntax : extCmd. y.e. Vi Microsystems Pvt. If the previously stored image was in 8 bit colour format (1 byte per pixel) or 16 bits (2 bytes per pixel) then this must be specified in the colourMode byte parameter.ViARM-2378 DEVELOPMENT BOARD 7. y) and the size of the image by width and height parameters. height. Description : This command displays a bitmap image or an icon on to the screen that has been previously stored at a particular sector address in the memory card. The screen position of the image to be displayed is specified by (x. . The user must make sure the 32 bit address of each stored command/object is known before using this feature.10. Description: Some of the commands can be stored as objects in the memory card which can be later recalled by the host on demand and displayed or executed. [ 80 ] . The table at the end of this section lists all of the commands that can be stored as objects within the memory card. Vi Microsystems Pvt. @ascii cmd : 4Fhex. 7. Ltd.ViARM-2378 DEVELOPMENT BOARD 7. @ascii cmd : 50hex.9. Oascii Address(Umsb:Ulsb:Lmsb:Llsb): A 4 byte (32 bit) memory address of a previously stored Object that is about to be displayed. cmd. cmd. For example. Display Object from Memory Card(@O) Syntax : extCmd. Pascii Address(Umsb:Ulsb:Lmsb:Llsb): A 4 byte memory card address for the internal command execution. a series of images can be stored as icons and later displayed as the application requires them. It is advisable to have the Exit Program or the Jump to Address commands at the end of the user composed program so that the pointer does not run off so to speak. Run Program from Memory Card (@P) Syntax : extCmd. It will sequentially execute any valid memory related commands and display objects until it gets to the end of the memory. Address(Umsb:Ulsb:Lmsb:Llsb) extCmd : 40hex. from the memory card without any further interaction by the host processor. Address(Umsb:Ulsb:Lmsb:Llsb) extCmd : 40hex. Description : The Run command forces the 32bit internal memory pointer to jump to the specified address and automatically start executing commands. value(msb:lsb) cmd : 07hex value(msb:lsb) : A 2 byte delay value in milliseconds. A delay basically has the same effect as a NOP (No Operation) which can be used to determine how long the object stays on the screen before the next object is displayed.535 milliseconds or 65. 7. We can increase that length by looping through the animation a number of times depending on the value set in the counter. we may want to animate the Globe rotating. This command when used in conjunction with Decrement Counter and Jump to Address If Counter Not Zero commands allow the user to determine exactly how many times the series of images are looped. Delay (07hex) (memory card command only) Syntax : cmd. Maximum value of 65. Practical values should be between 2 and 255. For example.5 seconds.. value cmd : 08hex value : A 1 byte counter value that can be used with Decrement Counter and Jump to Address If Counter Not Zero commands to form loops. Set Counter (08hex) (memory card command only) Syntax : cmd. Vi Microsystems Pvt. [ 81 ] .12. a delay can be inserted between subsequent objects. the effective duration will only be the length of time it takes to display the 10 image frames.ViARM-2378 DEVELOPMENT BOARD 7. Description : A series of images that might be part of an animation may need to be redisplayed over and over to achieve a lengthy viewing. When the images are displayed sequentially. Description : When objects from the memory card such as images are displayed sequentially. Ltd. Let’s say we have 10 image slides of the Globe at different rotated positions residing in the memory card.11. value cmd : 08hex Description : Decrements the counter. The following demonstrates how this maybe used: Address (dec) Command 00000000 00000002 00000012 00000015 00000025 Set Counter (value = 25). Display Image from Memory Card (image10). Display Image from Memory Card (image1). See detailed description on how this command can be used effectively in the Set Counter command section. Delay(10ms).13. [ 82 ] . …. Decrement Counter Jump to Address if Counter Not Zero (Address = 00000002 ) 00000119 00000129 00000132 00000134 Note : The above example is typical of how a series of commands might be loaded into the memory card and then executed by using the Run Program from Memory Card command.ViARM-2378 DEVELOPMENT BOARD When the display reaches the end of the last frame and encounters the Decrement Counter followed by Jump to Address If Counter Not Zero commands. This sequence will repeat until the value in the counter reaches zero. the counter will be decremented and then the internal pointer will jump to the memory Address specified in the “Jump to Address If Counter Not Zero” command. Decrement Counter (09hex) (memory card command only) Syntax : cmd. 7. The commands would off course be the series of hex codes. Vi Microsystems Pvt. Display Image from Memory Card (image2). Delay(10ms). Ltd.. Delay(10ms). When the internal program memory pointer encounters this command it will force the command execution from memory card to stop. Exit Program from Memory Card (0Chex) Syntax : cmd Cmd : 0Chex Description : This command forces the program to stop executing from the memory card and ready to accept and execute commands from the host via the serial interface. [ 83 ] . If the counter is zero then it will continue executing the next command. Jump to Address If Counter Not Zero (0Ahex) (memory card command only) Syntax : cmd.ViARM-2378 DEVELOPMENT BOARD 7. It can also be sent via the serial port while the program is running and commands are being executed from the memory card.16. Please see detailed description on how this command can be used effectively in the Set Counter command section.14. Vi Microsystems Pvt.. 7. Address(Umsb:Ulsb:Lmsb:Llsb) cmd : 0Bhex Address(Umsb:Ulsb:Lmsb:Llsb): A 4 byte (32 bit) memory jump address.15. Jump to Address (0Bhex) (memory card command only) Syntax : cmd. Ltd. Description : This command will force the internal 32 bit program memory pointer to jump unconditionally to the specified address and start executing commands from there. Address(Umsb:Ulsb:Lmsb:Llsb) cmd : 0Ahex Address(Umsb:Ulsb:Lmsb:Llsb): A 4 byte (32 bit) memory jump address if the counter is not zero. Description : If the internal counter is not zero the program pointer will jump to the specified address. 7. Olimex uses these displays on their more sophisticated development boards.99 (US) plus $10. TFT LCD Interface (Thin Film Transistor Liquid Crystal Display): Introduction Liquid crystal was discovered by the Austrian botanist Fredreich Rheinizer in 1888. The early prototypes (late 1960s) were too unstable for mass production. Sparkfun Electronics sells a model 6100 for $19. There have been countless millions of Nokia cell phones sold world-wide and this economy of scale has made it possible for the hobbyist and experimenter to procure the LCD graphic display from these phones at a reasonable price.ViARM-2378 DEVELOPMENT BOARD 28. But all of that changed when a British researcher proposed a stable. [ 84 ] . so this tutorial will be geared to the Olimex SAM7-EX256 board shown on the front cover. so shipping is a bit slow). Today's color LCD TV and LCD Monitors have a sandwich-like structure with liquid crystal filled between two glass plates. I’ve seen sources for this display on EBay for $7.00 (US) also (see photograph below). scientists showed that liquid crystals when stimulated by an external electrical charge could change the properties of light passing through the crystals. "Liquid crystal" is neither solid nor liquid (an example is soapy water)..95 (US). The Swedish web shop Jelu has this display for about $20.00 shipping (from Hong Kong. Nokia 6100 LCD Display (from Jelu web site) Vi Microsystems Pvt. Ltd. liquid crystal material (biphenyl). In the mid-1960s. Figure 1. it’s a Philips PCF8833. it’s an Epson controller. if the LCD has a GE-12 sticker on it. To keep this tutorial simple. there are two possibilities (Epson S1D15G00 or Philips PCF8833). If it has a GE-8 sticker. I will not address the issues of scrolling or partial displays (to conserve power) since these are rarelyused features. None of these examples matched exactly the Philips PCF8833 or the Epson S1D15G00 user manuals. The trading companies in Honk Kong have no idea what is inside the displays they are selling. I was not happy with any of the driver software examples I had inspected. [ 85 ] . their web site indicates that the newer ones are an Epson clone. The older Sparkfun 6100 displays were Epson. Vi Microsystems Pvt. So how do you tell which controller you have? Some message boards have suggested that the LCD display be disassembled and the controller chip measured with a digital caliper – well that’s getting a bit extreme. The Epson S1D15G00 user manual is a poor English translation and nearly incomprehensible. which can be downloaded from these links. 4-bits blue) 3. Here’s what I know. The Olimex boards have both display controllers possible. I had to “invert” the entire display and “reverse” the RGB order to get the colors to work out properly for the Philips controller. So I set out to write a driver based solely on the LCD controller manufacturer’s manual.3 volts 9-bit SPI serial interface (clock/data signals) The major irritant in using this display is identifying the graphics controller. This is not to say that I didn’t have my own mysteries.ViARM-2378 DEVELOPMENT BOARD The important specifications for this display are as follows: 132 x 132 pixels 12-bit color rendition (4 bits red.. 4-bits green. Ltd. The LCD display sold by the German Web Shop Jelu has a Leadis LDS176 controller but it is 100% compatible with the Philips PCF8833). A Nokia 6100 display that I purchased from Hong Kong a couple of weeks ago had the Philips controller. they all seemed to be “mash-ups” – collections of code snippets for both types of controllers mixed together. Sparkfun software examples sometimes refer to the Philips controller so the whole issue has become a bit murky. you can download the Olimex schematic for the SAM7-EX256 board to see their design for a hardware interface to the Nokia 6100 LCD display. of course. The normal orientation is as follows: Figure 2.ViARM-2378 DEVELOPMENT BOARD I used the Olimex SAM7-EX256 evaluation board as the execution platform. I also used the YAGARTO/Eclipse platform as the crossdevelopment environment which is explained in great detail in my tutorial “Using Open Source Tools for AT91SAM7 Cross Development” which can be downloaded from the following link: Hardware connection issues are also not the subject of this tutorial. [ 86 ] . if you desire). Practically speaking. each one with 12-bit color (4 bits RED. as shown below. 4 bits GREEN and 4 bits BLUE).. you cannot see the first and last row and columns. LCD Display Orientation The Nokia 6100 display has 132 x 132 pixels. This is an ARM7 board with many peripherals that is an excellent way to learn about the ARM architecture at a reasonable price ($120 from Sparkfun). So I set the “mirror x” and “mirror y” command to rotate the display 180 degrees. Default Orientation of Nokia 6100 LCD Display That. This will be the orientation used in this tutorial (it is so easy to change back. Ltd. is upside-down on the Olimex SAM7-EX256 board if the silkscreen lettering is used as the up/down reference. Vi Microsystems Pvt. [ 87 ] . SPI serial interface sends commands and data bytes Vi Microsystems Pvt. The ARM7 microcontroller SPI peripheral generates the clock and data signals and the display acts solely as a slave device. the ninth bit (command or data) is clocked out first and is LOW to indicate a command byte or HIGH to indicate a data byte. temperature data. Tutorial Orientation of Nokia 6100 LCD Display Communication with the Display The Nokia 6100 uses a two-wire serial SPI interface (clock and data). the display is strictly write-only! We send 9 bits to the display serially. Therefore. Note in the timing diagram below from the Philips manual.. status. Figure 4. etc). Olimex elected to not implement the MISO0 signal that would allow the ARM microcontroller to read from the LCD display (you could read some identification codes. Ltd. the ninth bit indicates if a command byte or a data byte is being transmitted.ViARM-2378 DEVELOPMENT BOARD Figure 3. so commands or data are submitted to the SPI peripheral as unsigned integers (32 bits) wherein only the lower 9 bits are used. // PCF8833 data byte // wait for the previous transfer to complete // set bit 8 .ViARM-2378 DEVELOPMENT BOARD How fast can this SPI interface be run? Since the PCF8833 data sheet specifies that the serial clock SCLK period be no less than 150 nsec. This is quite safe as you will never get stuck forever in that wait loop. data = (data | 0x0100).indicates a "command" byte // send the command Likewise.sends a command byte to the LCD WriteSpiData(data) . // Initialize SPI interface to LCD WriteSpiCommand(SETCON). // contrast 0x30 (range is -63 to +63) Vi Microsystems Pvt. to initialize the SPI interface and then set the contrast for the Philips controller: InitSpi( ).. for example. but that is tempting fate. unsigned int data. dividing the board’s master clock (48054841 Hz) by 8 gives a period of 166 nsec. [ 88 ] . Thus we can safely run the SPI interface at 6 MHz. command = (command & (~0x0100)). unsigned int command. // PCF8833 command byte // wait for the previous transfer to complete // clear bit 8 . For example. // Write contrast (command 0x25) WriteSpiData(0x30).sends a data byte to the LCD Using these commands is quite simple. while ((pSPI->SPI_SR & AT91C_SPI_TXEMPTY) == 0). The lowest 8 bits contain the desired PCF8833 data byte. The SAM7-EX256 board uses an ARM7 microprocessor. pSPI->SPI_TDR = data. while ((pSPI->SPI_SR & AT91C_SPI_TXEMPTY) == 0). to send a command we clear bit 8 to specify this is a command transmission. to send a data byte we set bit 8 to specify that this is a data transmission. Ltd. The lowest 8 bits contain the desired PCF8833 command. The LCD driver has three functions supporting the SPI interface to the LCD: InitSpi( ) . pSPI->SPI_TDR = command.sets up the SPI interface #1 to communicate with the LCD WriteSpiCommand(command) . I have run the SPI interface at 16 MHz and it still worked.indicates a "data" byte // send the command Both snippets have a “wait until TXEMPTY” to guarantee that a new command/data stream is not started before the previous one has completed. The backlight can be turned on and off using PB20. Figure 5.. 1 = full on) Table 1. The LED backlight needs a lot of current. so a 7-volt boost converter is used for this purpose. Hardware Interface to Nokia 6100 LCD Display (Olimex design) Vi Microsystems Pvt. but I doubt anyone would want the backlight to be at half brightness. PA2 LCD Reset (set to low to reset) PA12 LCD chip select (set to low to select the LCD chip) PA16 SPI0_MISO Master In . [ 89 ] .Slave Out (not used in LCD nterface) PA17 SPI0_MOSI Master Out . four bits from PIOA and one bit from PIOB. It looks like you might be able to PWM the backlight.ViARM-2378 DEVELOPMENT BOARD The hardware interface uses five I/O port pins.Slave In pin (Serial Data to LCD slave) PA18 SPI0_SPCK Serial Clock (to LCD slave) PB20 backlight control (normally PWM control. as shown in Table 1 and Figure 5 below. I/O port bits used to support the SPI interface to the LCD Display Note in Table 1 above that Olimex elected not to support the SPIO_MOSI – Master In bit (PA16) which would have allowed the user to read from the display. Ltd. ViARM-2378 DEVELOPMENT BOARD Addressing Pixel Memory The Philips PCF8833 controller has a 17424 word memory (132 x 132).. WriteSpiCommand(PASET). Vi Microsystems Pvt. The pixel memory has 132 rows and 132 columns. // Row address set (command 0x2B) // starting x address // ending x address (same as start) // Column address set (command 0x2A) // starting y address // ending y address (same as start) [ 90 ] . where each word is 12 bits (4-bit color each for red. Philips PCF8833 Pixel Memory To address a single pixel. 7) use the following sequence. WriteSpiData(2). Ltd. but it has a wrap-around and autoincrement feature that greatly simplifies writing character fonts and filling rectangles. You address it by specifying the address of the desired pixel with the Page Address Set command (rows) and the Column Address Set command (columns). WriteSpiData(7). the starting pixel and the ending pixel. The Page Address Set and Column Address Set command specify two things. WriteSpiData(2). to specify a single pixel at (2. For example. This has the effect of creating a drawing box. WriteSpiCommand(CASET). WriteSpiData(7). as shown in below Figure 6. green and blue). just specify the same location for the starting pixel and the ending pixel on each axis. This sounds overly complex. WriteSpiCommand(CASET). Figure 7. Figure 7 illustrates the 12 bits/pixel encoding.. WriteSpiData(9).example illustrates sending 2 pixels Vi Microsystems Pvt. WriteSpiCommand(PASET). 9) use the following sequence. The bytes are packed so that two pixels will occupy three sequential bytes and the process repeats until the drawing boundaries are used up. This encoding requires a Memory Write command and 1.5 subsequent data bytes to specify a single pixel. to define a drawing rectangle from (4. 12 bits per pixel (native mode) Selection of the native 12 bits/pixel mode is accomplished by sending the Color Interface Pixel Format command (0x3A) followed by a single data byte containing the value 3. the extra pixels are discarded by the controller. as shown below. WriteSpiData(4). WriteSpiData(11). Color encoding for 12 bits / pixel . any subsequent memory operations are confined to that boundary. WriteSpiData(3). 1. For example. For instance. The Epson S1D15G00 controller has essentially the same memory layout as the Philips/NXP PCF8833.ViARM-2378 DEVELOPMENT BOARD To address a rectangular area of pixels. // Row address set (command 0x2B) // starting x address // ending x address // Column address set (command 0x2A) // starting y address // ending y address Once the drawing boundaries have been established (either a single pixel or a rectangular group of pixels). [ 91 ] . 12-Bit Color Data The Philips PCF8833 LCD controller has three different ways to specify a pixel’s color. just specify the starting location and the ending location on each axis. 3) to (11. if you try to write more pixels than defined by the boundaries. Ltd. Color encoding for 12 bits / pixel . Ltd. This encoding requires a Memory Write command and a single subsequent data byte to specify a single pixel. The color information is encoded as 3 bits for red. Figure 8 demonstrates how to send a single pixel using 12-bit encoding. The straggler red bits from the next pixel wait for the completion of the remaining colors which will never come. as shown in Figure 9 below Figure 9. I added a NOP command in the LCDSetPixel( ) function to guarantee that the unused red information from the next pixel is discarded.. [ 92 ] . 3 bits for green and 2 bits for blue. Note that the last 4 red bits from the next pixel will be ignored. To be safe. Figure 8. 8 bits per pixel Selection of the reduced resolution 8 bits/pixel mode is accomplished by sending the Color Interface Pixel Format command (0x3A) followed by a single data byte containing the value 2. Appearance of any command will cancel the previous memory operation and discard the unused pixel information. Will the 4-bits of red information from the next pixel (usually set to zero) perturb the neighboring pixel? The answer is no since the PCF8833 controller writes to display RAM only when it gets a complete pixel.ViARM-2378 DEVELOPMENT BOARD You might pose the question “What happens if I specify a single pixel with just two data bytes.example illustrates sending 1pixel 2. The data byte contains all the color information for one pixel. Color encoding for 8 bits – per – pixel Vi Microsystems Pvt. // blue 010 value WriteSpiData(15). 12 bits/pixel. // green 101 value WriteSpiData(14). there is no saving of display memory. // red 111 value WriteSpiData(0). // red 010 value WriteSpiData(7). This Color Set table will convert 3-bit RED to 4-bit RED. The resolution of the Nokia 6100 display is 132 x 132 pixels. // blue 000 value WriteSpiData(6). // green 010 value WriteSpiData(7). // Define Color Table (command 0x2D) WriteSpiData(0). [ 93 ] . // red 011 value WriteSpiData(9). Therefore.. // red 000 value WriteSpiData(2). The 8 bits/pixel encoding would make a photograph look terrible. Vi Microsystems Pvt. This is made possible by the specification of the 20 entry color table in the initialization step. Ltd. The 8 bits/pixel encoding would use about 1/3 less data bytes to fill an area. // red 100 value WriteSpiData(11). In the author’s view. I elected to not implement the color table and 8-bit encoding in this driver. // green 011 value WriteSpiData(9). // blue 011 value Consider the following points.ViARM-2378 DEVELOPMENT BOARD The important thing to note here is that this 8-bit color encoding will be converted to the 12-bit encoding by the Color Table that you set up in advance. // red 001 value WriteSpiData(5). // green 100 value WriteSpiData(11). // red 110 value WriteSpiData(16). there’s very little to be gained by using this mode in an ARM microcontroller environment. // green 001 value WriteSpiData(5). // green 111 value WriteSpiData(0). // red 101 value WriteSpiData(14). // blue 001 value WriteSpiData(11). 3-bit GREEN to 4-bit GREEN and 2-bit BLUE to 4-bit BLUE. so there would be a performance gain in terms of the number of bytes transferred. // green 110 value WriteSpiData(16). // green 000 value WriteSpiData(2). WriteSpiCommand(RGBSET). Since the 8 bits/pixel encoding is converted by the color table to 12 bits/pixel. My view is that nobody is going to display the Mona Lisa on this tiny display. The color information is encoded as 5 bits for RED. Color encoding for 16 bits – per . The row and column addresses will automatically increment and wrap back when you come to the end of a row. Remember how the pixel was addressed by defining a “drawing box”? If you are planning to draw an 8 x 8 character font. [ 94 ] . This feature allows you to efficiently draw a character or fill a box with just a simple loop – taking advantage of the wrap-around after writing the pixel in the last column and auto-incrementing to the next row. Vi Microsystems Pvt. as shown in Figure 10 below Figure10. The Epson S1D15G00 controller supports the 8-bit and 12-bit modes.pixel This pixel encoding is converted by the controller using a dithering technique to the 12-bit data for the pixel RAM. The net effect is to give 65k color variations. 6 bits for GREEN and 5 bits for BLUE. so 16-bit color encoding would be rarely used. This encoding requires a Memory Write command and two subsequent data bytes to specify a single pixel.. but not the 16-bit mode. I did not include support for it in the driver software. Ltd. 16 bits per pixel Selection of 16 bits/pixel mode is accomplished by sending the Color Interface Pixel Format command (0x3A) followed by a single data byte containing the value 5. as shown in Figure 11 below. Wrap-Around and Auto Increment The wrap-around feature is the cornerstone of the controller’s design and it amazes me how many people ignored it in drawing rectangles and character fonts.ViARM-2378 DEVELOPMENT BOARD 3. but you could easily add it if you desire. define the drawing box as 8 x 8 and do a simple loop on 64 successive pixels. The grand total is 106 SPI transmissions. set Memory Write and feed two bytes of color data for each pixel. Ltd. When the “max” column address pixel is done. Set the column and row address to the bottom left of the drawing box. since three data bytes will specify the color for two pixels. The advantage gained using the autoincrement and wrap-around features is obvious. Writing three memory bytes will illuminate two pixels (12-bit resolution). Figure 11. Compare that to the implementation where you address each pixel.. Set up a loop to do all the pixels in the box. Now keep writing memory bytes until the next row is illuminated and so on. [ 95 ] . Then we do a single Memory Write command followed by three data bytes done 33 times. Note that we set the row and column address just once (pointing to the lower left corner). Specifically. Drawing Box permits auto-increment and wrap-around.ViARM-2378 DEVELOPMENT BOARD The rules for Auto-incrementing and Wrap-Around are as follows. To illustrate this technique. Vi Microsystems Pvt. Each pixel written automatically advances the column address. The grand total would be 576 SPI transmissions. Figure 12 shows the code to fill an 8 x 8 box shown above. the loop will typically iterate over ½ the total number of pixels in the box. the column address wraps back to the column starting address AND the row address increments by one. ViARM-2378 DEVELOPMENT BOARD // Row address set (command 0x2B) WriteSpiCommand(PASET); WriteSpiData(4); WriteSpiData(11); // Column address set (command 0x2A) WriteSpiCommand(CASET); WriteSpiData(2); WriteSpiData(9); // Write Memory (command 0x2C) WriteSpiCommand(RAMWR); // loop on total number of pixels / 2 for (i = 0; i < ((((11 - 4 + 1) * (9 - 2 + 1)) / 2) + 1); i++) { // use the color value to output three data bytes covering two pixels WriteSpiData((color >> 4) & 0xFF); WriteSpiData(((color & 0xF) << 4) | ((color >> 8) & 0xF)); WriteSpiData(color & 0xFF); } Figure 12. Code Snippet to Fill an 8 x 8 box Code to use this technique to draw a character font is similar, but at each pixel you have to determine if the font calls for a foreground color or the background color. Initializing the LCD Display (Philips PCF8833) This was a surprise to me but the Philips PCF8833 does not quite boot into a “ready to display” mode after hardware reset. The following is the minimal commands/data needed to place it into 12-bit color mode. First, we do a hardware reset with a simple manipulation of the port pin. Reset is asserted low on this controller. // Hardware reset LCD_RESET_LOW; Delay(20000); LCD_RESET_HIGH; Delay(20000); The controller boots into SLEEPIN mode, which keeps the booster circuits off. We need to exit sleep mode which will also turn on all the voltage booster circuits. // Sleep out (command 0x11) WriteSpiCommand(SLEEPOUT); Vi Microsystems Pvt. Ltd., [ 96 ] ViARM-2378 DEVELOPMENT BOARD This is still a mystery to me, but I had to invert the display and reverse the RGB setting to get the colors to work correctly in this particular display. If you have trouble, consider removing this command. // Inversion on (command 0x20) WriteSpiCommand(INVON); // seems to be required for this Controller For this driver, I elected to use the 12-bit color pixel format exclusively. // Color Interface Pixel Format (command 0x3A) WriteSpiCommand(COLMOD); WriteSpiData(0x03); // 0x03 = 12 bits-per-pixel In setting up the memory access controller, I elected to use the “mirror x” and “mirror y” commands to reorient the x and y axes to agree with the silk screen lettering on the Olimex board. If you want the default orientation, send the data byte 0x08 instead. Finally, I had to reverse the RGB color setting to get the color information to work properly. You may want to experiment with this setting. // Memory access controller (command 0x36). WriteSpiCommand(MADCTL); WriteSpiData(0xC8); // 0xC0 = mirror x and y, reverse rgb I found that setting the contrast varies from display to display. You may want to try several different contrast data values and observe the results on your display. // Write contrast (command 0x25) WriteSpiCommand(SETCON); WriteSpiData(0x30); // contrast 0x30 Delay(2000); Now that the display is initialized properly, we can turn on the display and we’re ready to start producing characters and graphics. // Display On (command 0x29) WriteSpiCommand(DISPON); Note While we are using TFT LCD close the jumper J22 to J25 as downward direction. Vi Microsystems Pvt. Ltd., [ 97 ] ViARM-2378 DEVELOPMENT BOARD CHAPTER - 3 DEVELOPMENT TOOLS ARM IAR Embedded Workbench The ARM IAR Embedded Workbench IDE is a very powerful Integrated Development Environment that allows you to develop and manage complete embedded application projects. Creating Application Project ARM IAR Embedded Workbench integrated development environment (IDE) demonstrates a typical development cycle shows how you use the compiler and the linker to create a small application for the Arm core. For instance, creating a workspace, setting up a project with C source files, and compiling and linking and application. Setting up Create a New Project Using the IAR Embedded Workbench IDE, you can design advanced project models. You create a workspace to which you add one or several projects. There are ready-made project templates for both application and library projects. Each project can contain a hierarchy of groups in which you collect your source files. For each project you can define one or several build configurations. Because the application in this tutorial is a simple application with very few files, the Tutorial does not need an advanced project model. We recommend that you create a specific directory where you can store your entire project files. In this tutorial we call the directory projects. You can find all the files needed for the tutorials in the arm\tutor directory. Make a copy of the tutor directory in your Projects directory. Before you can create your project you must first create a workspace. CREATING A WORKSPACE WINDOW The first step is to create a new workspace for the tutorial application. When you start The IAR Embedded Workbench IDE for the first time, there is already a ready-made Workspace, which you can use for the tutorial projects. If you are using that workspace, you can ignore the first step. Choose File>New>Workspace. Now you are ready to create a project and add it to the Workspace. Vi Microsystems Pvt. Ltd., [ 98 ] [ 99 ] . Vi Microsystems Pvt. 2..ViARM-2378 DEVELOPMENT BOARD CREATING THE NEW PROJECT 1. Click Cancel Button. Ltd. Run the Application IAR Embedded Workbench. Creating your ‘C’ file. 4. New>File Menu. [ 100 ] . for creating a new ‘C ‘file.. Vi Microsystems Pvt. Ltd.ViARM-2378 DEVELOPMENT BOARD 3. C and click Save Button.ViARM-2378 DEVELOPMENT BOARD 5. [ 101 ] .. File>Save As. Vi Microsystems Pvt. Ltd. 6. Give your File name Eg: DAC. for saving a file. Select Button Project >Create New Project Menu.. [ 102 ] . Ltd. for creating a project. 8. Click OK Button following window will open. Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD 7. ViARM-2378 DEVELOPMENT BOARD 9. Right Click the project name option for select a ‘C’ file in workspace window..C Menu. Select Add >Add DAC. Give Project Name Eg: LPC2378 and click SAVE Button. ADDING THE FILES TO THE PROJECT 10. [ 103 ] . Ltd. Vi Microsystems Pvt. Choose Add >Add Files menu. [ 104 ] . Ltd.. Vi Microsystems Pvt. Before that the header files are store the path at where your ‘C’ files is located. 12. Select LPC2378>Rebuild all menu. Right Click the Project name option in workspace window for adding a header files. for checking any error in your ‘C’ file.ViARM-2378 DEVELOPMENT BOARD 11. [ 105 ] .. If your ‘C‘ file has no error the following window will be displayed. Select LPC2378 >Options menu Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD 13. Ltd. 14. hex. [ 106 ] .ViARM-2378 DEVELOPMENT BOARD 15. Enable Other Menu and select Intelextented option. Vi Microsystems Pvt.. Select Linker Category. 16. Ltd. Enable output option file and give File name.hex Eg: LPC2378. Enable Overide default option and click Browse button for choosing a LPC2378-Flash-XCL file.0 Kick Start \Arm\Examples\NxP\LPC23XX\IAR-LPC-2378\SK\simple\common\XCL\ LPC2378 FlashXCL and click OK button. Vi Microsystems Pvt. Path: C:\Program Files\IAR Systems\Embedded Workbench 4. Ltd.. Select Config Menu. [ 107 ] .ViARM-2378 DEVELOPMENT BOARD 17. ViARM-2378 DEVELOPMENT BOARD BUILTING THE PROJECT 18. Select LPC2378 >Rebuild All Menu, for Builting a project. 19. If your project has no error Builting completed and Hex file generated. This Hex file will be downloaded to the VIARM-2378 controller by Flash Magic Software Vi Microsystems Pvt. Ltd., [ 108 ] ViARM-2378 DEVELOPMENT BOARD FLASH ISP UTILITY In- System Programming (ISP) : In System Programming is programming or Reprogramming the on-chip flash memory, using the boot-loader software and a serial port. The LPC2378 Micro controller provides on-chip boot-loader software that allows programming of the internal flash memory over the serial channel. Pulling port pin P2.10 low during reset of the Microcontroller activates the boot-loader. ViARM-2378 Board contains circuits for Controlling Pin P2.10 over Toggle switch. ViARM-2378 Development Board has an Reset switch and Mode Selection Switch (Programming /Execution Switch). Through this one, can change either Programming mode or Execution Mode. Philips provides a utility program for In-System Flash (ISP) programming called Flash Magic Software. For now, it is assumed that the program to be downloaded is already developed and there exist a HEX-file to be downloaded. This HEX-file represents the binary image of the application program. Vi Microsystems Pvt. Ltd., [ 109 ] ViARM-2378 DEVELOPMENT BOARD FLASH MAGIC 1. Run FLASH MAGIC Application, the following window will appear. 2. In Step-1 Section, Select communication port Eg:COM1 Vi Microsystems Pvt. Ltd., [ 110 ] Select Micro-controller Device LPC2378. Select Baud Rate 19200 4. Vi Microsystems Pvt. [ 111 ] . Ltd.ViARM-2378 DEVELOPMENT BOARD 3.. Vi Microsystems Pvt.. 5. Select Oscillator frequency 12Mhz.ViARM-2378 DEVELOPMENT BOARD 5. before programming in Step-2 Section. Enable Erase Blocks for Erasing the memory locations of microcontroller. [ 112 ] . Ltd. Ltd. for verifying data’s in memory locations after programming success Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD 7. Enable Verify After Programming Option in Step-4 Section.. for Select the HEX file to be downloaded in Step-3 Section. Click the Browse Button. 8. [ 113 ] . Vi Microsystems Pvt. [ 114 ] . If given HEX file is properly downloaded.. The downloaded Program will start after changing the Mode of Execution (Change the Toggle Switch to Execution Mode and Press Reset Key).ViARM-2378 DEVELOPMENT BOARD 9. for hex file downloaded to the LPC – 2378 Controller. the window as shown in below. Select Start Button in Step-5. Ltd. 11. 10. multi tasking kernel for microprocessors and micro controllers. ROMable. suspend and resume a task. 3. real-time. XP for your Pentium computer applications. OS FUNCTIONS OSTaskCreate () OSinit () OSStart () OS_STK OSTaskNameSet () Vi Microsystems Pvt. μC/OS-II can manage up to 64 application tasks and provides the following services: 1. check the size of task’s stack. 2. The embedded operating system need only less memory & also possible for the developer to write his/her own operating system kernel. Like any OS it consists of a kernel. board level routines & other utilities (device drivers) to support the applications. μC/OS-II. preemptive. The Real time kernel is a completely portable. Change Priority. 6. Fixed Sized Memory Block management 8. delete a task. Semaphores Event Flags Mutual Exclusion Semaphores (to reduce priority inversions) Message Mailboxes Message Queues Task Management (Create. scalable. [ 115 ] . Suspend/Resume etc. Time Management TASK MANAGEMENT It services that create a task. often constant. used for real time embedded applications. In RTOS time constraints is very critical. Delete. 4. μC/OS-II Memory is allocated and de-allocated from a pool with deterministic.. Ltd. 5. changes a task priority.ViARM-2378 DEVELOPMENT BOARD CHAPTER – 4 ABOUT RTOS REAL TIME SYSTEMS A RTOS is the readymade operating system like a WINDOWS.) 7. timing. 0. which actually starts multitasking. OSStart (). Eg2: OS_STK OS_STK OS_STK OS_STK Task1stk [100]. 0. INT8U prio) Eg1: OSTaskCreate (Task1. which allows you to reduce the amount of RAM needed in your applications. Ltd. Task4stk [300]. 1).OS_STK *ptos. Syntax OSTaskCreate(void(*task)(void *pd).. 2. &Task1stk [99]. [ 116 ] . &Task1stk [99]. . OS_STK Each task requires its own stack. Tasks can be created either prior to the start of multitasking or by a running a task. OSTaskCreate () OSTaskCreate creates a task so it can managed by μC/OS-II. //start multitasking } Vi Microsystems Pvt. Task2stk [100]. Task3stk [100]. however μC/OS-II allows each task to have a different stack size. Eg3: Void main () { OSInit ().ViARM-2378 DEVELOPMENT BOARD 1.void *pdata. 1). //Initialize μC/OS-II OSTaskCreate (Task1. 3. . OSInit () OSInit () initializes μC/OS-II and must be called prior to calling OSStart (). OSTimeDly () OSTimeDly () allows a task to delay itself for an integral number of clock ticks."T1". INT8U *err). Syntax: Void OSTaskNameSet (INT8U prio. OSTimeDly (30). Ltd. This function is typically used by a debugger to allow associating a name to a task. TIME MANAGEMET OS FUNCTIONS: • OSTimeDly () • OSTimeDlyHMSM () • OSTimeTick () 1.. Syntax: Void OSTimeDly (INT16U TICKS). Rescheduling always occurs when the number of clock ticks is greater than zero. This function is typically called from your startup code but after you call OSInit (). //delay task for 30 ticks } } Vi Microsystems Pvt.535 ticks. Eg4: Void Task1(void *pdata) { While (1) { FIO4SET0 = 0x04. &err). OSTaskNameSet () OSTaskNameSet () allows you to assign name to a task. [ 117 ] . Valid delays range from one to 65.ViARM-2378 DEVELOPMENT BOARD 4. Refer Eg3. OSStart () OSStart () starts multitasking under μC/OS-II. INT8U *pname. 5. Eg4: OSTaskNameSet (1. OSTimeDlyHMSM(0. VICIntSelect &= ~(1 << VIC_TIMER0). /* Get the peripheral clock frequency*/ Vi Microsystems Pvt.5. Ltd.ViARM-2378 DEVELOPMENT BOARD 2. Syntax: OSTimeDlyHMSM (INT8U hours.&Font_7x8). [ 118 ] . /* Enable the timer interrupt source*/ pclk_freq = BSP_CPU_PclkFreq(PCLK_TIMER1).. This format is more convenient and natural than ticks. OSTimeTick () OSTimeTick () processes a clock tick. and milliseconds. CPU_INT32U rld_cnts. Eg5: Void task1() { GLCD_Printf("NXP LPC2378". INT8U seconds. Rescheduling always occurs when at least one parameter is zero. INT8U milliseconds). minutes. OSTimeDlyHMSM () OSTimeDlyHMSM () allows a task to delay itself for a user specified amount of time specified in hours. Syntax: Void OSTimeTick (void) Eg6: Static void Tmr_TickInit (void) { CPU_INT32U pclk_freq.0). /* Configure the timer interrupt as an IRQ source */ VICVectAddr4 =(CPU_INT32U)Tmr_TickISR_Handler. seconds. } 3. INT8U minutes./* Set the vector address*/ VICIntEnable = (1 << VIC_TIMER0).0. void *MessageStorage[10].ViARM-2378 DEVELOPMENT BOARD rld_cnts = pclk_freq / OS_TICKS_PER_SEC. stop TC*/ /* Capture is disabled*/. void Task4(void *pdata). = 0. /* Enable timer 0 */ SAMPLE PROGRAMS: 1.. = 3. Task4stk[300]. /* Calculate the # of counts T0TCR T0TCR T0PC T0MR0 T0MCR T0CCR T0EMR T0TCR } = (1 << 1). char KeyRead(char). = 0. void Task1(void *pdata). Ltd. = 0. Task3stk[100]. Vi Microsystems Pvt. void Task3(void *pdata). [ 119 ] . = 1. = 0. PROGRAM FOR LED’S AND GRAPHICS LCD USING μC/OS-II #include<includes. Task2stk[100].. = rld_cnts. void Task2(void *pdata).\n". /* No external match output*/. OS_STK OS_STK OS_STK OS_STK Task1stk[100].h> #include<images. necessary for the OS ticker */ /* Disable and reset counter 0 and the prescale counter 0 */ /* Clear the reset bit*/ /* Prescaler is set to no division*/ /* Interrupt on MR0 (reset TC). void uCdetails().h> #define DEF_FALSE 0 #define DEF_TRUE 1 unsigned char data[]="DATA FROM LPC2378 DEVELOPMENT BOARD.. unsigned int value. 0)..0).&Font_7x8). Ltd..3).0).5).) { value = (CPU_INT32U)OSCPUUsage. GLCD_Printf("VI Microsystems".2). GLCD_DisplayValue(value. value = (CPU_INT32U)OSTime.&Font_7x8).ViARM-2378 DEVELOPMENT BOARD void Task1(void *pdata) { GLCD_ClearDisplay(). GLCD_LocateCursor(5. FIO4CLR0 = 0x04.5.8. for(. GLCD_Printf("uC/OS . GLCD_DisplayValue(value.6). OSTimeDly(20). GLCD_DisplayValue(value.8. } } Vi Microsystems Pvt. OSTimeDly(20). [ 120 ] .0. uCdetails().4). GLCD_LocateCursor(70.3).II". GLCD_Printf("NXP LPC2378". OSTimeDlyHMSM(0.&Font_7x8). value = (CPU_INT32U)OSCtxSwCtr.0). OSTimeDly(30). GLCD_ClearDisplay(). } } void Task2(void *pdata) { while(1) { FIO4SET0 = 0x04. GLCD_LocateCursor(70. GLCD_LocateCursor(70. GLCD_LocateCursor(20. GLCD_LocateCursor(25.3. &err). BSP_Init(). BSP_IntDisAll(). &Task2stk[99]. OSTaskNameSet(2. GLCD_Init(). GLCD_ClearDisplay(). OSTaskNameSet(3.. OSTaskNameSet(1. 0.ViARM-2378 DEVELOPMENT BOARD void Task3(void *pdata) { for(. &err)."T4". &err). OSTimeDly(70). OSTaskCreate(Task1. FIO4CLR0 = 0x10.."T3". FIO4CLR0 = 0x40. OSTaskCreate(Task2. 0. OSTimeDly(70). OSTaskCreate(Task3. OSTimeDly(50). [ 121 ] . 3). OSTimeDly(50). OSInit(). } } void main() { CPU_INT08U err. &Task4stk[299]. 1). OSTaskCreate(Task4. 2). &Task3stk[99]. OSStart(). &Task1stk[99]. Ltd."T2". } Vi Microsystems Pvt. 0. &err). 4).) { FIO4SET0 = 0x10."T1".. 0. OSTaskNameSet(4. } } void Task4(void *pdata) { for(.) { FIO4SET0 = 0x40. GLCD_LocateCursor(70.&Font_7x8). GLCD_LocateCursor(0. GLCD_Printf("/SEC". GLCD_LocateCursor(0.2).2). GLCD_LocateCursor(88. GLCD_DisplayValue(value. GLCD_LocateCursor(0. GLCD_Printf("CPU Freq:". value = (CPU_INT32U)BSP_CPU_ClkFreq() / 1000000L. GLCD_Printf("Version :V". } Vi Microsystems Pvt. GLCD_LocateCursor(0.&Font_7x8).&Font_7x8).0). GLCD_Printf("MHz". value = (CPU_INT32U)OS_TICKS_PER_SEC.5).0).1). Ltd.3).1.&Font_7x8).4). GLCD_LocateCursor(88.0).&Font_3x6). GLCD_Printf("Ctx Swt :".ViARM-2378 DEVELOPMENT BOARD void uCdetails() { GLCD_LocateCursor(20. GLCD_LocateCursor(70. GLCD_LocateCursor(80.4).&Font_7x8).3). GLCD_DisplayValue(value. GLCD_Printf("TickRate:". value = (CPU_INT32U)OSVersion().&Font_7x8).3. GLCD_Printf("CPU Used:".&Font_7x8). GLCD_LocateCursor(0.&Font_7x8).&Font_7x8).2). GLCD_Printf("OS DETAILS". GLCD_Printf("%".6).2.4). GLCD_LocateCursor(84. GLCD_Printf("OS Ticks:". GLCD_LocateCursor(0.2). GLCD_DisplayValue(value.. [ 122 ] .1). .C OS_MUTEX.ViARM-2378 DEVELOPMENT BOARD PROCDEURE 1. 3.C OS_TASK.H PORT • • • • • OS_CPU. Include following μC/OS-II header files.ASM OS_CPU_C. To write a multi tasking program using μC/OS-II real time kernel. Vi Microsystems Pvt. And executing the program.C • BSP.C UC_CPU • CPU.C OS_SEM.C BSP • BSP. [ 123 ] . OS_CORE. That files are taken from below folders are APP • OS_CFG.H • MAIN.H UCOS-II • • • • • • • • • • • 4.H Compile your project.C OS_TIME. Ltd.C UCOSII.C OS_DBG.C OS_MBOX. 2.H OS_CPU_A.C OS_MEM.S • CPU_DEF.C OS_Q.C OS_FLAG.C OS_TMR.C OS_DCC.H • CPU_A. Task3stk[100]. void Task1(void *pdata). [ 124 ] .) { FIO4SET0 = 0x10.. } } void Task2(void *pdata) { for(..ViARM-2378 DEVELOPMENT BOARD 2. FIO4CLR0 = 0x01..) { FIO4SET0 = 0x01. void Task3(void *pdata). OSTimeDly(20). OSTimeDly(30). } } void Task3(void *pdata) { for(. OSTimeDly(10).) { FIO4SET0 = 0x04.. FIO4CLR0 = 0x04. OSTimeDly(20). void Task2(void *pdata). void Task1(void *pdata) { BSP_Init(). Ltd.h> OS_STK OS_STK OS_STK Task1stk[100]. FIO4DIR0=0xff. FIO4CLR0 = 0x10. OSTimeDly(10). OSTimeDly(30). Task2stk[100]. for(. Vi Microsystems Pvt. PROGRAM FOR LED’S USING μC/OS-II #include<includes. 2). Ltd. 0. OSTaskCreate(Task2. OSInit(). OSTaskCreate(Task3.. [ 125 ] . 0. OSStart(). &Task3stk[99]. 3). OSTaskCreate(Task1. &Task2stk[99].ViARM-2378 DEVELOPMENT BOARD } } void main() { BSP_IntDisAll(). 0. 1). &Task1stk[99]. } NOTE The Procedure as same as program 1 Vi Microsystems Pvt. U0DLM = Fdiv / 256.h" void delay() { unsigned int i. } } Vi Microsystems Pvt. PINSEL0 = 0x00000050. /* RxD0 and TxD0 */ /* 8 bits.h> #include "irq. FIO3DIR = 0X008000FF.j++). U0LCR = 0x03. } int main (void) { unsigned int Fdiv. TargetResetInit(). U0DLL = Fdiv % 256. delay(). for(i=0.j<0xff. Ltd. 1 Stop bit */ /*baud rate */ /* DLAB = 0 */ /* Enable and reset TX and RX while(1) { FIO3PIN = 0X000000ff. delay().ViARM-2378 DEVELOPMENT BOARD CHAPTER – 5 SOFTWARE EXAMPLE Example – 1 Program For 8 . no Parity. U0LCR = 0x83. FIFO. FIO3PIN = 0X00000000.i++) for(j=0. Fdiv = ( Fpclk / 16 ) / 19200 . U0FCR = 0x07..h" #include "config. [ 126 ] .i<0x3fff.Bit LED Interface #include <iolpc2378.j. 0x02.h" #include "config. FIO4DIR = 0XFFFF0000. unsigned int Read_Key.0x80}.0x08. unsigned char scan [] = { 0x00000E00. [ 127 ] .0x01.0x00000700}.0x00000B00.ViARM-2378 DEVELOPMENT BOARD Example – 2 Program For 8-Way DIP Switch Interface #include <iolpc2378.j. void delay() { unsigned int i. FIO4PIN = 0X0.i<0xff. FIO3DIR = 0X008000FF.h> #include "irq.i++) for(j=0.j++). } Vi Microsystems Pvt.j<0xff.0x04.h" #include "config. while(1) { FIO3PIN = FIO4PIN .0x40.h" unsigned int k. for(i=0. for(i=0..0x00000D00.0x10. Ltd.j.0x20.h> #include "irq. unsigned int dat[] = {0x00.j<0xff.i<0x1Fff.j++). void delay() { unsigned int i.h" unsigned int k. unsigned int i.i++) for(j=0. } int main (void) { TargetResetInit(). } } Example – 3 Program For 4 x 4 Matrix Keypad Interface #include <iolpc2378. U0FCR = 0x07. U0LCR = 0x83. FIO3PIN = 0X00000002. if((Read_Key==0x07)) { send_serial_data('0'). } Vi Microsystems Pvt. Fdiv = ( Fpclk / 16 ) / 19200 . no Parity. } if( (Read_Key==0x0d)) { send_serial_data('2'). [ 128 ] . 1 Stop bit */ /*baud rate */ /* DLAB = 0 */ /* Enable and reset TX and RX FIFO. U0THR = serial. } int main (void) { unsigned int Fdiv.ViARM-2378 DEVELOPMENT BOARD void send_serial_data(unsigned char serial) { while((U0LSR & 0x20)==0). FIO4DIR = 0X00000FFF. Read_Key = (Read_Key & 0xf000) >> 12 . /*First Row*/ Read_Key = FIO4PIN. U0DLL = Fdiv % 256. PINSEL0 = 0x00000050. U0LCR = 0x03. FIO3PIN = 0X00000000. FIO3PIN = 0X00000001.. TargetResetInit(). */ while(1) { FIO4SET = 0X00000e00. /* RxD0 and TxD0 */ /* 8bits. Ltd. FIO3DIR = 0X008000FF. U0DLM = Fdiv / 256. } if((Read_Key==0x0b)) { send_serial_data('1'). if((Read_Key==0x07)) { send_serial_data('8'). /*Third Row*/ Read_Key = FIO4PIN. FIO3PIN = 0X00000007. } FIO4CLR = 0X00000d00. Read_Key = (Read_Key & 0xf000) >> 12 . if((Read_Key==0x07)) { send_serial_data('4'). } if( (Read_Key==0x0d)) { send_serial_data('6'). FIO3PIN = 0X00000004. FIO4SET = 0X00000b00. Ltd. FIO3PIN = 0X00000006. } FIO4CLR = 0X00000e00. } if((Read_Key==0x0b)) { send_serial_data('5'). FIO4SET = 0X00000d00. FIO3PIN = 0X00000003. /*Second Row*/ Read_Key = FIO4PIN. } Vi Microsystems Pvt. delay(). FIO3PIN = 0X00000005. } if( (Read_Key==0x0e)) { send_serial_data('7').. [ 129 ] . Read_Key = (Read_Key & 0xf000) >> 12 . delay().ViARM-2378 DEVELOPMENT BOARD if((Read_Key==0x0e)) { send_serial_data('3'). FIO3PIN = 0X00000008. ViARM-2378 DEVELOPMENT BOARD if((Read_Key==0x0b)) { send_serial_data('9'). } Vi Microsystems Pvt.. FIO3PIN = 0X0000000f. } if((Read_Key==0x0d)) { send_serial_data('e'). FIO4SET = 0X00000700. FIO3PIN = 0X0000000b. Read_Key = (Read_Key & 0xf000) >> 12 . FIO3PIN = 0X0000000d. FIO3PIN = 0X0000000e. if((Read_Key==0x07)) { send_serial_data('c'). FIO3PIN = 0X00000009. } return 0. } if( (Read_Key==0x0e)) { send_serial_data('b'). FIO3PIN = 0X0000000c. } if((Read_Key==0x0b)) { send_serial_data('d'). FIO3PIN = 0X0000000a. [ 130 ] . } FIO4CLR = 0X00000700. Ltd. delay(). /*Fourth Row*/ Read_Key = FIO4PIN. } if( (Read_Key==0x0e)) { send_serial_data('f'). delay(). } FIO4CLR = 0X00000b00. } if( (Read_Key==0x0d)) { send_serial_data('a'). 12MHz. } PLLCON &= ~0x01. n = 1. SBSEL = 6 . m = 24.h" #include "target.1=11 */ /* PLL Divider = 1.h" /* set to 1Mhz */ void PLL_Init (void) { unsigned int m. 0x55 */ PLLFEED = 0x55. Ltd. /* OSCRANGE = 0.. as the PLL clock source */ [ 131 ] . Vi Microsystems Pvt. Enable the main oscillator */ while ((SCS & 0x40) == 0) CLKSRCSEL = 0x01.h" #include "irq. /* OSCEN = 1. clk_div_usb = /PLL Multiplier = 20.1 = 0 */ /*Configure the ARM Core clock divCCLKSEL= 6 -1 */ /* Configure the USB clock divider to 6. clk_div = 4.1 */ if ((PLLSTAT & 0x02000000) > 0) { PLLCON &= ~0x02. unsigned int clk_div. /* PLL register update sequence. /* Select main OSC. unsigned int n. Main OSC is between 1 and 20 Mhz */ SCS |= 0x20. unsigned int clk_div_usb. 0x55 */ PLLFEED = 0x55. /* Disable the PLL */ PLLFEED = 0xAA.h> #include "type. SCS &= ~0x10. 0xAA. #define ADC_CLK 1000000 #include "config. /* Disconnect the PLL */ PLLFEED = 0xAA.h" #include "uart. 0xAA.ViARM-2378 DEVELOPMENT BOARD Example – 4 Program For Serial Interface #include<iolpc2378. /* PLL register update sequence.h> unsigned int ADC_VALUE=0. MSEL bits = 12 . NSEL bits = 1 .h" #include <intrinsics. t1 = temp % 10. temp = temp % 100. send_serial_data(t1000+0x30). 0x55 */ PLLFEED = 0x55. PLLFEED = 0x55. PLLCON |= 0x02. /* Configure the USB clock divider */ while ((PLLSTAT & 0x04000000) == 0) PCLKSEL0 = 0xAAAAAAAA. [ 132 ] . 0xAA./*Set peripheral clocks to be half of main clock */ PCLKSEL1 = 0x22AAA8AA. U0THR = serial. send_serial_data(t100 +0x30). PLLFEED = 0xAA. 0xAA. 0x55 */ /* Enable the PLL */ /* PLL register update sequence. temp = ch % 1000. 0x55 */ /*Configure the ARM Core Processor clock divider */ USBCLKCFG = clk_div_usb. PLLCON |= 0x01. Vi Microsystems Pvt. 0xAA.temp. t100 = temp / 100.ViARM-2378 DEVELOPMENT BOARD PLLCFG = (m << 0) | (n << 16). } void adc_serial_tx(unsigned int ch) { unsigned int t1000. Ltd. PLLFEED = 0xAA. CCLKCFG = clk_div. PLLFEED = 0x55. } void send_serial_data(unsigned char serial) { while((U0LSR & 0x20)==0).t10. The PLL is now the active clock source */ PLLFEED = 0xAA. /* Configure the PLL multiplier and divider */ /* Configure the PLL multiplier and divider*/ /* PLL register update sequence. while ((PLLSTAT & 0x02000000) == 0) PCLKSEL0 = 0x55555555.. /* PCLK is the same as CCLK */ PCLKSEL1 = 0x55555555. t1000 = ch / 1000. /* Connect the PLL. /* PLL register update sequence.t1. //PLLCFG = 11. t10 = temp / 10.t100. ViARM-2378 DEVELOPMENT BOARD send_serial_data(t10+0x30); send_serial_data(t1+0x30); send_serial_data(0x0d); send_serial_data(0x0a); } int putchar(int ch) { if (ch == '\n') { while (!(U0LSR & 0x20)); U0THR = 0x0d; } while (!(U0LSR & 0x20)); return (U0THR = ch); } void main() { unsigned long int val; unsigned int Fdiv; PLL_Init(); PCONP |= (1 << 12); PINSEL1 = 0X00054000; PINSEL0 = 0x00000050; //AD0.0 AS ANALALOG INPUT // RxD0 and TxD0 U0LCR = 0x83; // 8 bits, no Parity, 1 Stop bit Fdiv = (60000000 / 16 ) / 19200 ; //baud rate U0DLM = Fdiv / 256; U0DLL = Fdiv % 256; U0LCR = 0x03; // DLAB = 0 U0FCR = 0x07; // Enable and reset TX and RX FIFO. send_serial_data('a'); install_irq( UART0_INT, (void *)UART0Handler, HIGHEST_PRIORITY ) ; while(1) { send_serial_data('a'); printf("\n\r Welcome"); } } Vi Microsystems Pvt. Ltd., [ 133 ] ViARM-2378 DEVELOPMENT BOARD Example – 5 Program for SPDT Relay Interface #include <iolpc2378.h> #include "irq.h" #include "config.h" void delay() { unsigned int i,j; for(i=0;i<0x2Fff;i++) for(j=0;j<0xff;j++); } int main (void) { TargetResetInit(); FIO3PIN = 0X0; FIO3DIR = 0XFFFFFFFF; while(1) { FIO3SET = 0x05000000; delay(); FIO3CLR = 0x05000000; delay(); } } Example – 6 Program for Stepper Motor Interface #include <iolpc2378.h> #include "irq.h" #include "config.h" void delay() { unsigned int i,j; for(i=0;i<0xff;i++) for(j=0;j<0xff;j++); } int main (void) { TargetResetInit(); Vi Microsystems Pvt. Ltd., [ 134 ] ViARM-2378 DEVELOPMENT BOARD IO0DIR = 0XFFFFFFFF; while(1) { for(k=0;k<10;k++) { IO0SET = 0X00000240; delay(); IO0CLR = 0X00000240; IO0SET = 0X00000140; delay(); IO0CLR = 0X00000140; IO0SET = 0X00000180; delay(); IO0CLR = 0X00000180; IO0SET = 0X00000280; delay(); IO0CLR = 0X00000280; } } } Vi Microsystems Pvt. Ltd., [ 135 ] } return 0. if((joy_stick & 0XFF) ==0xBF) FIO3PIN = 0X44.h" #include "config. FIO4PIN = 0X00000000. } Vi Microsystems Pvt. FIO3DIR = 0X000000FF.h" unsigned int k. unsigned int i. TargetResetInit(). [ 136 ] .h> #include "irq. if((joy_stick & 0xff)==0x7F) FIO3PIN = 0X22..ViARM-2378 DEVELOPMENT BOARD Example – 7 Program for Joystick Interface #include <iolpc2378. int main (void) { unsigned long int joy_stick. if((joy_stick & 0XFF) ==0xf7) FIO3PIN = 0X0F. joy_stick = IO1PIN . if((joy_stick & 0x20) ==0x0) FIO3PIN = 0XFF. //LED0. Ltd. joy_stick = (joy_stick & 0XFFFF0000) >> 16 . while(1) { joy_stick = IO1PIN . IO1DIR = 0X0000FFFF. joy_stick = joy_stick >> 20 . if((joy_stick & 0XFF) ==0xfb) FIO3PIN = 0XF0. U0DLM = Fdiv / 256. t1 = temp % 10.temp. } void adc_serial_tx(unsigned int ch) { unsigned int t1000. U0LCR = 0x83.h" #include "config. PINSEL1 = 0X00054000. temp = temp % 100. t100 = temp / 100. Fdiv = ( Fpclk / 16 ) / 19200 . send_serial_data(t10+0x30). send_serial_data(0x0d).h> #include "irq. Ltd. } void main() { unsigned long int val.t100. t10 = temp / 10. TargetResetInit(). unsigned int Fdiv..h" unsigned int ADC_VALUE=0.ViARM-2378 DEVELOPMENT BOARD Example – 8 Program for ADC Interface #include<iolpc2378. t1000 = ch / 1000. PCONP |= (1 << 12). 1 Stop bit // baud rate [ 137 ] . PINSEL0 = 0x00000050. #define ADC_CLK 1000000 void send_serial_data(unsigned char serial) set to 1Mhz */ { while((U0LSR & 0x20)==0). U0DLL = Fdiv % 256. //AD0. Vi Microsystems Pvt.t1. no Parity. send_serial_data(t1000+0x30). send_serial_data(t1+0x30). send_serial_data(0x0a). U0THR = serial. temp = ch % 1000. send_serial_data(t100 +0x30).t10.0 AS ANALALOG INPUT // RxD0 and TxD0 // 8 bits. val = (AD0GDR>>6)& 0x3ff adc_serial_tx(val)..h> #include "dac. return. U0FCR = 0x07. Ltd. // DLAB = 0 // Enable and reset TX and RX FIFO. } } Example – 9 Program DAC Interface #include <iolpc2378. software controlled */ ( 0 << 17 ) | /* CLKS = 0. no BURST. normal operation */ ( 0 << 22 ) | /* TEST1:0 = 00 */ ( 1 << 24 ) | /* START = 0 A/D conversion stops */ ( 0 << 27 ).1 ) << 8 ) | /* CLKDIV = Fpclk / 1000000 .26 to DAC output */ [ 138 ] . AD0CR = ( 0x01 << 0 ) | /*SEL=1.1 */ ( 1 << 16 ) | /* BURST = 0. /* set p0.trigger A/D conversion) */ while(1) { while((AD0GDR & 0X80000000)!=0X80000000).h" void DACInit( void ) { PINSEL1 = 0x00200000. } Vi Microsystems Pvt. 11 clocks/10 bits */ ( 1 << 21 ) | /* PDN = 1.select channel 0~7 on ADC0 */ ( ( Fpclk / ADC_CLK . /* EDGE = 0 (CAP/MAT singal falling.ViARM-2378 DEVELOPMENT BOARD U0LCR = 0x03. temp = temp % 100.t100.temp. temp = ch % 1000.1 ) << 8 ) | /* CLKDIV = Fpclk / 1000000 .y.. /* set to 1Mhz */ void send_serial_data(unsigned char serial) { while((U0LSR & 0x20)==0). Ltd.h> #include "irq.t1. U0THR = serial. t1000 = ch / 1000. software controlled */ ( 0 << 17 ) | /* CLKS = 0.1 */ ( 1 << 16 ) | /* BURST = 0. t1 = temp % 10. } void adc_serial_tx(unsigned int ch) { unsigned int t1000.ViARM-2378 DEVELOPMENT BOARD Example – 10 Program Accelerometer Interface #include<iolpc2378. no BURST. send_serial_data(t1000+0x30). t10 = temp / 10.t10.z. 11 clocks/10 bits */ ( 1 << 21 ) | /* PDN = 1. send_serial_data(t10+0x30). unsigned long int x. #define ADC_CLK 1000000 unsigned long int val. send_serial_data(t100 +0x30).h" unsigned int ADC_VALUE=0. normal operation */ Vi Microsystems Pvt.h" #include "config. [ 139 ] . } unsigned long adc_0() { AD0CR = ( 0x01 << 0 ) | /* SEL=1. t100 = temp / 100.select channel 0~7 on ADC0 */ ( ( Fpclk / ADC_CLK . send_serial_data(t1+0x30). trigger A/D conversion) */ while((AD0GDR & 0X80000000)!=0X80000000). 11 clocks/10 bits */ ( 1 << 21 ) | /* PDN = 1. trigger A/D conversion) */ while((AD0GDR & 0X80000000)!=0X80000000).select channel 0~7 on ADC0 */ ( ( Fpclk / ADC_CLK . trigger A/D conversion) */ while((AD0GDR & 0X80000000)!=0X80000000). Ltd. /* EDGE = 0 (CAP/MAT signal falling. software controlled */ ( 0 << 17 ) | /* CLKS = 0. } unsigned long adc_6() { AD0CR = ( 0x01 << 6 ) | /* SEL=1. val = (AD0GDR>>6)& 0x3ff return(val).select channel 0~7 on ADC0 */ ( ( Fpclk / ADC_CLK .1 ) << 8 ) | /* CLKDIV = Fpclk / 1000000 . } Vi Microsystems Pvt. [ 140 ] . val = (AD0GDR>>6)& 0x3ff return(val).ViARM-2378 DEVELOPMENT BOARD ( 0 << 22 ) | ( 1 << 24 ) | ( 0 << 27 ). 11 clocks/10 bits */ ( 1 << 21 ) | /* PDN = 1. val = (AD0GDR>>6)& 0x3ff return(val). normal operation */ ( 0 << 22 ) | /* TEST1:0 = 00 */ ( 1 << 24 ) | /* START = 0 A/D conversion stops */ ( 0 << 27 ). /* TEST1:0 = 00 */ /* START = 0 A/D conversion stops */ /* EDGE = 0 (CAP/MAT signal falling. software controlled */ ( 0 << 17 ) | /* CLKS = 0.1 */ ( 1 << 16 ) | /* BURST = 0.. } unsigned long adc_1() { AD0CR = ( 0x01 << 1 ) | /* SEL=1. no BURST. normal operation */ ( 0 << 22 ) | /* TEST1:0 = 00 */ ( 1 << 24 ) | /* START = 0 A/D conversion stops */ ( 0 << 27 ).1 ) << 8 ) | /* CLKDIV = Fpclk / 1000000 .1 */ ( 1 << 16 ) | /* BURST = 0. /* EDGE = 0 (CAP/MAT signal falling. no BURST. send_serial_data(' '). U0FCR = 0x07. send_serial_data(' '). . trigger A/D conversion) */ while(1) { y = adc_0(). software controlled */ ( 0 << 17 ) = 0. U0DLM = Fdiv / 256. send_serial_data(':'). 11 clocks/10 bits */ ( 1 << 21 ) | /* PDN = 1.ViARM-2378 DEVELOPMENT BOARD void main() { unsigned int Fdiv. adc_serial_tx(y). send_serial_data(':'). Fdiv = ( Fpclk / 16 ) / 19200 . send_serial_data(' '). Vi Microsystems Pvt.1 */ ( 1 << 16 ) | /* BURST = 0. send_serial_data('X'). AD0CR = ( 0x01 << 0 ) | /* SEL=1. send_serial_data(' '). /* EDGE = 0 (CAP/MAT signal falling.1 ) << 8 ) | /* CLKDIV = Fpclk / 1000000 . U0LCR = 0x03. PCONP |= (1 << 12). send_serial_data(' ').. PINSEL1 = 0X00054000 PINSEL0 = 0x00000050. send_serial_data('Y'). U0LCR = 0x83. normal operation */ ( 0 << 22 ) | /* TEST1:0 = 00 */ ( 1 << 24 ) | /* START = 0 A/D conversion stops */ ( 0 << 27 ). Ltd. U0DLL = Fdiv % 256. x = adc_1(). send_serial_data(' '). z = adc_6().select channel 0~7 on ADC0 */ ( ( Fpclk / ADC_CLK . TargetResetInit(). [ 141 ] . no BURST. adc_serial_tx(x). c=((r&0x0e)<<4) | ((g & 0x0e)<<1) | ((b & 0x0c)>>2). r=(color & 0x0f00)>>8.Dly. } void graphics() { unsigned int idx. Vi Microsystems Pvt. send_serial_data(':').ViARM-2378 DEVELOPMENT BOARD send_serial_data('Z').h> #include<images. send_serial_data(' '). } } Example – 11 Program Colour LCD Interface #include<iolpc2378. send_serial_data(' '). send_serial_data(0x0d). adc_serial_tx(z)..h> void delay() { for(int Dly = 0xFFFF. unsigned int g.h> #include<font. send_serial_data(' '). unsigned int y. [ 142 ] .g. return c.Dly--) { } } char color8(short color){ char c. char r. g=(color & 0x00f0)>>4. b=(color & 0x000f). send_serial_data(0x0a). Ltd.h> #include<system. unsigned int b.b. unsigned int x.h> #include<glcd_drv. unsigned int r.h> #include<math. GLCD_Send(DATA. Ltd.char width. g = rand() % 15.j+=2) { c1=buffer[i+height*j].RAMWR). GLCD_Send(CMD. GLCD_Send(CMD. unsigned int color.x). } if (b < temp) { b = temp. b = rand() % 15. r = rand() % 15.CASET). idx++) { x = rand() % 120.j<width.y+height-1).j.i<height. } color = (r << 8) | (g << 4) | b. idx < 1024.c1. delay().i++) { for (j=0. GLCD_FillCircle(x. GLCD_Send(DATA.int *buffer) { int i. } } void LCD_blit(char x. [ 143 ] .c2. } if (g < temp) { g = temp. for (i=0.char height. temp = idx / 64.x+width-1). GLCD_Send(DATA.char y. for (idx = 512. Vi Microsystems Pvt. x &= 0xfe. GLCD_Send(DATA.PASET). GLCD_Send(CMD. y. y+=2. if (r < temp) { r = temp. 10.ViARM-2378 DEVELOPMENT BOARD unsigned int temp. color).y).. y = rand() % 120. Yellow). GLCD_FillRectangle(0. GLCD_Send(DATA.LightBlue.0.(c2 & 0x00ff)). [ 144 ] . Ltd. void clear(int *buffer) { int i. int i. SSP0_Init(). //configure Fast io FIO3DIR |= (1UL<<25). } } //buffer for full color animation int buffer[32][32].0.i++) buffer[i]=0.((c1 & 0x000f)<<4) | ((c2 & 0x0f00)>>8)). GLCD_Send(DATA.ViARM-2378 DEVELOPMENT BOARD c2=buffer[i+height*j+height].DarkGreen).. SCS |= 1. } } } void dly2(int a) { long int i. j=10000*a.132. long int j. LCD_LightSet(0x00). MAM_Init(). for(i=0. PLL_Init(). GLCD_String("VI Microsystems". GLCD_Send(DATA. //Reset line LCD_LightInit().(c1 & 0x0ff0)>>4). for (i=0. } void main() { int dly=1. } Vi Microsystems Pvt.Font8x16. GLCD_Init().i<j.i++) { .132.i<50*50.50. Ltd.ViARM-2378 DEVELOPMENT BOARD APPENDIX – A CIRCUIT DIAGRAM Vi Microsystems Pvt.. [ 145 ] . 6/PCAP1.1MF 0.10/ENET_RXD1 P1.5/MOSI0 P1.1MF 0.7/D7 +3.3V R134 1K R79 1K +3.16/ENET_MDC P1.5/A5 P4.5/PWM1.3V 1K +3. Ltd.3V 1K P0.2 P0.11/A11 P4.1 J13 JM-3 1 IO_P0.0/PWM1.13/USB_UP_LED2/MOSI1/AD0.0 P0.0 P1.4/MISO0 P1.8 P2.3V 1K +3.3V USB_LINK USB_CONNECT U2D+ U2DVBUS P32 P48 P36 P37 P30 SCK0 SSEL0 MISO0 MOSI0 LCD BL P49 P50 P53 P54 P57 UP DOWN RIGHT LEFT CENTER P46 P47 P51 P61 P56 P0.27/SDA0 P0.24/OE P4.4 P2.5 PWM2 J29 JMP-4 1 2 RXD1 3 4 4 2 PIPESTAT0 J28 JMP-4 1 P2.26/AD0.3V SP4 MISO0 R75 1 2 MOSI0 1K MCICLK R131 MCICMD R132 P0.1MF 0.1/A1 P4.8 P0.1MF 0.12/A12 P4.3 P0.1/CAP1.1/RXD3 P4.1/PWM1.17/ENET_MDIO P0.9 P2.3/RXD0 P107 P106 P105 P100 P99 P97 P96 P95 P93 P92 P76 P75 P73 P71 RTCX1 VDD_3V3 VDD_3V3 VDD_3V3 VDD_3V3 VDD_DCDC_3V3 VDD_DCDC_3V3 VDD_DCDC_3V3 VDDA VREF VBAT P52 P55 P58 P68 P72 P74 P78 P84 MCP1319MT .3V 1K +3.0 +3.14/USB_CONNECT2/SSEL1 P0.1 3 1K P66 P67 P116 P115 1 R73 MISO0 RD1 TD1 RD2 TD2 RSTSW(2PIN) P25 1 3 330E R160 P2.18/USB_UP_LED1/PWM1. P0.1 P1.7/A7 P4.3/CTS1/PIPESTST1 P2.2/SCK0 P1.24/PWM1.1 P1.11/RXD2/SCL2/MAT3.24 1 3 5 7 9 11 13 15 17 19 PWM6 J20 3 J36 JM-3 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 SCK0 SSEL0 MISO0 DTR1 JM-3 P0.31/USB_D+2 USB_D-2 P1.3V R159 TDO TDI TMS TRST TCK RTCK RSTOUTRST- P23 R158 2 ADC1 R56 1K TP3 POT TP4 POT 2 ADC2 100E C39 100E +3.1/D1 P3.6/I2SRX_SDA/SSEL1/MAT2.0/ENET_TXD0 P1.10 C40 1 2 3 1 2 3 RRE KEY 18pF P22 P44 P59 P65 P79 P103 P117 P119 P139 P15 TINNY SW TRACE SIGNALS SCK1 2 3 1 MISO1 3 MOSI1 P0.2 P3.31/CS1 P0.3V 1K CS1 R127 CS2 R126 RS R133 P0.3/D3 P3.6/D6 P3.3/SSEL0 P1.8V P26 P6 P1 P3 P4 P5 P7 P143 P20 P24 +3.24 P0.0/RI1/TRACEPKT1 P2.20/PWM1.1/ENET_TXD1 P1.18/DCD1/MOSI0/MOSI P0..10 R80 P0.4/DCD1/PIPESTST2 P2.29/PCAP1.0 LCD_EN P3.1/I2SRX_WS/CAP3.17/CTS1/MISO0/MISO P0.10 P0.3V 1K +3.8 J15 JM-3 2 3 3 3 P2.7 P2.27/CAP0.1 P2.16/RXD1/SSEL0/SSEL P0. +3.4/I2SRX_CLK/RD2/CAP2.25/MAT1.0 TRACESYNC J31 JMP-4 1 2 2 TRACECLK 2 STEPPER MOTOR WITH SPI-1 J27 JMP-4 1 J37 JM-3 {ADC} 2 P0.6 1 P2.3/PWM1.15/ENET_REF_CLK P1.3/AOUT/RXD3 P1.2/I2SRX_SDA/TXD3 P0.25/AD0.2/PWM1.8/TD2/TXD2/TRACEPKT3 P2.6 P0.5 P2.6/CAP0.14/A14 P4.30/CS0 P4.1MF 0.3V SW12 SW23 18pF Y3 32.1 VDD1.1MF +3.24/CAP0.8/A8 P4.7 P2..31/SCK1/AD0.0/D0 P3.10 MCIDAT1 MCIDAT2 MCIDAT3 BUT1 P3.7 P0.3/A3 P4.6 P2.23/CAP0.6 2 1 PWM1 4 IO_P0.25/MAT0.5 ALARM DBGEN TD0 TDI TMS TRST TCK RTCK RSTOUT RESET LPC2378 X1(4PIN) +3.11/EINT1/MCIDAT1/I2STX_CLK P2.3 MCIDAT3 SW21 LC_LED0 LC_LED1 LC_LED2 LC_LED3 LC_LED4 LC_LED5 LC_LED6 LC_LED7 P45 P40 P39 P38 R162 BUT1 100E MCIDAT2 BUT2 100E C92 18pF C91 18pF SW22 BUT2 U13 U22 1 P0.1/MAT0.9/A9 P4.8V SPI_CS1 SPI_CS2 TDIR RDIR SPI_CS3 SPI_CS4 P98 P81 P21 RSTSW- +3.3V 3 J21 CTS1 PWM3 J30 JMP-4 1 TRACEPKT0 4 PIPESTAT1 DSR1 PWM5 J26 JMP-4 1 P2.7 2 TXD1 4 SSEL1 3 J12 JM-3 3 2 IO_P0.3V 4 RST 2 LCD RST- 5 VDD VCC VSS 3 RST GND RST 4 MR RSTSW- NC7SPU04P5X P1.9/I2STX_SDA/MOSI1/MAT2.8/I2STX_WS/MISO1/MAT2.1MF 0.6/DTR1/TRACEPKT0 P2.21/RI1/MCIPWR/RD1 P0.24 AOUT TRACEPKT1 1 2 P23 2 4 6 8 10 12 14 16 18 20 3 2 JM-3 PWM4 P0.0 P0.30/VBUS/AD0.5/DSR1/TRACESYNC P2.24 LCD RST P3.7 HEADER 10X2 Vi Microsystems Pvt.0 P0.1 6 3 VCC OUT NC GND 5 +3.1/PWM1.9 P2.9 P0.28/PCAP1.0 P1.29/MAT2.19/CAP1.45 SW0 SW1 SW2 SW3 SW4 SW5 SW6 SW7 P88 P91 P94 P101 P104 P108 P110 P120 VSS VSS VSS VSS VSS VSS VSS VSS VSS VSSA XTAL1 XTAL2 DC9 DC10 DC12 DC14 DC15 DC18 DC20 0.0/I2SRX_CLK/CAP3.4 4 IO_P0.23 P0.19/DSR1/MCICLK/SDA1 P0.2/RXD1/PIPESTST0 P2.26 2 RST 3 NC VCC A Y 1 RST- 5 +3.6/A6 P4.11 P113 P112 P111 P109 P69 P70 CS1 CS2 BUT2 SDA0 SCL0 BUT1 SPI_CS5 P89 P90 P86 P35 P34 P42 P28 PI.1/TD1/RXD3/SCL1 P0.23/PWM1.8/ENET_CRS P1.0 P0.1 P3.ViARM-2378 DEVELOPMENT BOARD +3.2 J14 JM-3 P0.9/ENET_RXD0 P1.8_1 U14 P0.1MF 0.3V 1K +3.2/D2 P3.3V 1K +3.12/MISO1/AD0.3 P2.21/PWM1.6 P1.11 SCL0 SDA0 MOSI0 RI1 3 TRACEPKT2 1 RTS1 1 X_OUT 3 ADC1 1 Y_OUT 3 ADC2 2 } P0.28/MAT2.25/WE P4.0/PCAP1.1 P0.1 P0.29/USB_D+1 P1.4/D4 P3.23/AD0.0/RD1/TXD3/SDA1 P0.3 PIPESTAT2 DCD1 P2.3V P2.3V 1K SCL0 P0.3V +1.3V K1 K2 K3 K4 K5 K6 K7 K8 P127 P124 P118 P122 P130 P134 R57 +3.7/I2STX_CLK/SCK1/MAT2.12/EINT2/MCIDAT2/I2STX_WS P2.2/TXD0 P0.3V CLK 4 12Mhz CMOS VCC P41 P102 P114 P138 P18 P60 P121 P14 P17 P27 CPU_CLKIN P31 CPU_CLKOUT P33 BUTTON SECTION.23 P29 1 2 } AOUT {ADC} J801 [ 146 ] .30/USB_D-1 P4.14/ENET_RX_ER P1.8 P0.5/I2SRX_WSK/TD2/CAP2.5/D5 P3.1MF DC19 DC16 DC11 0.4/ENET_TX_EN P1.6 P2.10/TXD2/SDA2/MAT3.15/TXD1/SCK0/SCK P0.10/A10 P4.13/EINT3/MCIDAT3/I2STX_SDA 1 R74 MOSI0 TXD0 RXD0 P0..0/MAT0.4/PWM1.24/AD0.2 P2.9 +3.23 Z_OUT DIOW P11 P13 P29 P63 E_TXD0 E_TXD1 E_TX_EN E_CRS E_RXD0 E_RXD1 E_RX_ER E_RX_CLK E_MDC E_MDIO PHY_INT P136 P135 P133 P132 P131 P129 P128 P126 P125 P123 P43 CP MCICLK MCICMD RS MCIDAT0 P87 P85 P83 P82 P80 MIC_IN AOUT WP P10 P8 P64 +3.1/PWM1.26/PWM1.3V R65 SDA0 R64 +3.26/MAT0.3V 3 P141 P142 P2.4 P1.1MF 0.7 P0.3V R165 1K R161 1K R166 P137 P140 P144 P2 P9 P12 P16 P19 P3.768KHz RTCX2 1K +1.4/A4 P4.8_2 VDD1.3V R55 1K +3.22/RTS1/MCIDAT0/TD1 P0.22/MAT1.2/A2 P4.0/A0 P4.0 P2.10 P0.13/A13 P4.0 P3.7/RD2/RTS1/TRACEPKT2 P2.8_3 VDD1.15/A15 P0.20/DTR1/MCICMD/SCL1 P0.9/USB_CONNECT1/RXD2/EXTIN0 P2.0/TXD3 P4.11 R78 1K +3.0/PWM1.1 P4.1/TXD1/TRACECLK P2.28/SCL0 P0.10/EINT0 P2. .RX+ ViARM-2378 DEVELOPMENT BOARD R50 0.7K +3. Vi Microsystems Pvt.3V U12 C84 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0.5V +3. .2K USB_CONNECT 1 C28 C22 R30 120E 3 VCC DD+ GND SHELL 1 2 3 4 5 2 P16 + 0.BC807 U2D+ J16 JM-3 3 Q4 1 R43 2 2.3V 1k 330E 330 33E 33E R61 R60 R69 R68 CT CT 6 TPIN- 7 C36 E_RX- E_RX+ E_TXE_TX+ NC C37 8 LED100 LEDACT PHY_INT 8 7 6 5 4 3 2 1 GND 0.9E R70 49. 13 14 15 16 17 18 19 20 21 22 23 24 R62 1k 36 35 34 33 32 31 30 29 28 27 26 25 TX+ RJ-45 FRONT VIEW 48 47 46 45 44 43 42 41 40 39 38 37 RST# VDDPLL X1 X0 GND GND VDDTX TX+ TXGND VDDRCV REXT R58 10K LPF RST- +3.3V 10uF/16V E_CRS L13 LED100 +3.9E R59 49.1MF X2/ICLK C82 0.1MF 10K +2. .1uF 0.01MF0.9E R54 P22 1 2 3 4 5 6 7 8 9 10 11 12 E_MDIO E_RXD1 E_RXD0 +3.3V C34 Y2 20MHz X1/ICLK X2/ICLK 0.3V R130 200E 1K RX- CRY_IN CRY_OUT 10uF/16V TX+ TX- +2.01uF L12 LEDACT LED +3..5V +3.5K R36 1. +3.6K R125 GND R122 Q5 BC846 8 LCD RST 33K DC R40 BL_PWR IN5819S 150E + C87 7 LCD RST 2 GND 2 R129 VIN C30 10MF/16V VOUT 2 ADJ LEDGND SCK0 MOSI0 SSEL0 D12 220uH 2.3V R31 47E L11 LED R46 330E USB SECTION .1mF LED C23 10MF/16V/T 330E + 10MF/16V/T R39 R35 R37 22k C32 18pF 1.2E VCC 1 VLRD R128 +3. Ltd.3V E_RX_ER MDIO MDC RXD3/PHYAD1 RXD2/PHYAD2 RXD1/PHYAD3 RXD0/PHYAD4 VDDIO GND RXDV/PCS_LPBK RXC RXER/ISO GND GND GND FXSD/FXEN RX+ RXVDDRX PD# LED3/NWAYEN LED2/DUPLEX LED1/SPD100 LED0/TEST INT#PHYAD0 U15 KS8721BL VDDC TXER TXC/REF_CLK TXEN TXD0 TXD1 TXD2 TXD3 COL/RMII COL/RMI_BTB GND VDDIO E_MDIO E_MDC 1 TX- 2 RX+ 3 TOUT+ TOUTTPIN+ 4 5 RX+ RXR53 RX- +2.1uF 0.5K C31 18pF +3.3V 10uF/6. +3.1MF X1/ICLK +3.3V C86 FB 5 1.3V C33 0.3V SCK DIO CS NC 6 1 220uF/16V P19 VDISPLAY VDIGITAL BL_PWR L10 USB_LINK R29 100E R34 10K USB-B R38 10K VBUS 33E 33E R45 R44 U2D.1MF R47 E_RX_CLK 1K ICS525-01R VCC BL_PWR 9 R41 R120 22E PK 6 10 U27 MC34063A 3 +3.3V 1 SP3 SMD PAD 1 +12V TFT DISPLAY SECTION .3V +3.5V C35 BD2 +2.01MF RJ-45 CON.5V + C38 +2.5V C43 BD1 49.3V +2.3V SWC TCAP SWE NA 8 R121 330 1K C85 47pF LCD BL R123 2K C83 + 10u/6.3V LED R66 4. [ 147 ] .3V 4 3 5 7 VCC RESET BD5 +3. . .3V FB0805 E_RX_CLK E_TX_EN E_TXD0 E_TXD1 E_TXD2 E_TXD3 C42 R67 NA 0.2K U10 LM317 3 + + 2 4 TFT_DISPLAY R124 5.5V FB0805 18pF R52 +2.9E R63 R51 1K 49.5V DC21 DC17 DC13 0.1MF R5 R6 S0 S1 S2 VDD X1/ICLK X2 GND V0 V1 V2 V3 V4 R4 R3 R2 R1 R0 VDD REF CLK GND PD V8 V7 V6 V5 28 27 26 25 24 23 22 21 20 19 18 17 16 15 ETHERNET SECTION . .1MF + C41 E_CRS +3. [ 148 ] .3V RN5 33E SW16 KEY 1 SW17 SW15 KEY 3 1 1 3 8 7 6 5 1 SW14 KEY 1 2 3 4 3 1 SW13 K1 K2 K3 K4 1 3 K4 K3 K2 K1 SW10 1 SW9 1 SW8 1 SW7 +3. .ViARM-2378 DEVELOPMENT BOARD K8 K7 K6 K5 3 3 3 3 3 3 1 1 R149 LC_LED1 R150 LC_LED2 R151 LC_LED3 R152 LC_LED4 R153 3 3 L20 LC_LED7 R156 +3.3V RN10 33E 1 SW6 1 SW5 1 SW4 1 SW3 LED SW1 L17 330E LED L16 330E LED J38 L15 330E 1 2 LED JMP-2 SW7 SW6 SW5 SW4 SW3 SW2 SW1 SW0 1 2 3 4 5 6 7 8 16 15 14 13 12 11 10 9 SW DIP- SWITCH & LED SECTION . Ltd.3V 1 2 3 4 8 7 6 5 LED L19 LED L18 330E R155 SW3 SW2 SW1 SW0 LED 330E LC_LED6 8 7 6 5 RN8 33E L21 330E R154 1 2 3 4 LED 330E +3.. . Vi Microsystems Pvt.3V RN9 33E L22 330E LC_LED5 8 7 6 5 SW20 SW7 SW6 SW5 SW4 LC_LED0 1 2 3 4 3 SW19 3 K5 K6 K7 K8 1 SW18 KEY 3 3 +3. 3V 26 T1OUT T2OUT T3OUT R1IN R2IN R3IN R4IN R5IN R1OUT R2OUT R3OUT R4OUT R5OUT C1+ C1C2+ C2V+ V- R2OUTB INVALID 9 10 11 MRTS1 MTXD4 MDTR1 19 18 17 16 15 DCD1 DSR1 CTS1 RI1 J4 JMP-2 4 5 6 7 8 JMP-2 J3 T1IN T2IN T3IN 2 MDCD1 MDSR1 MRXD4 MCTS1 MRI RTS1 20 21 1 2 DTR1 14 13 12 1 U7 MAX3243/SO RXD1 FORCEON FORCEOFF GND 25 VCC P2 5 9 4 8 3 7 2 6 1 MRI MDTR1 MCTS1 MTXD4 MRTS1 MRXD4 MDSR1 MDCD1 9 PIN 'D' M L5 MTXD4 LED R32 L4 1. Ltd. TXD1 C24 C75 100nF C25 100nF C26 100nF 100nF 28 24 1 2 27 3 23 22 +3.. [ 149 ] . .ViARM-2378 DEVELOPMENT BOARD FULL MODEM SECTION .5K VCC MRXD4 LED Vi Microsystems Pvt. . 5K +3.ViARM-2378 DEVELOPMENT BOARD SERIAL PORT SECTION . . .1MF/C 3 4 C20 0. Ltd.3V U6 ICL232 1 C19 0..1MF/C 2 6 C21 0. +3.3V RXD3 LED Vi Microsystems Pvt. [ 150 ] .1MF/C VCC C1- V+ C2+ V- C2T1IN R1OUT T2IN R2OUT GND T1OUT R1IN T2OUT R2IN 16 C18 0.1MF/C 15 14 13 7 8 TXD3 RXD3 2 2 5 11 12 10 9 C1+ 1 J1 JMP 1 J2 JMP P1 TXD0 5 9 4 8 3 7 2 6 1 RXD0 TXD3 RXD3 9 PIN 'D' M L3 TXD3 LED L2 R28 1. II JOYSTICK SECTION .3V 1 2 3 4 LEFT CENTER DOWN UP AUDIO JACK SECTION . .3V CAN PORT SECTION .3V +3.1uF 47nF AUDIO JACK .2K 120E DC2 100nF R15 J7 JMP-2 CAN_RX CAN_TX 1.1uF C49 + 1 8 4 C53 R88 C50 . . .3V A<1> 330 UP 330 6 C<3> R168 33K R163 COMMON<5> E<2> 3 DOWN 4 5 D<6> RIGHT RIGHT JOYSTICK C44 47pF 47pF B<4> 2 ZD1 BZV55C2V4 C45 4 8 AUDIO JACK + 1 LEFT R87 100K P24 +3. .8 1 R49 2 JMP-2 270E VCC PS/2 KEYBOARD AUDIO JACK SECTION .1uF + 10uF/16V 2 J33 JM-3 R90 1K 2 C52 2 1 3 2 VCC P25 1 2 3 4 5 6 C90 33nF Vi Microsystems Pvt. VCC RN2 R85 470 VCC 2 R82 1 3 C47 3 10K 100nP 2 R136 100K C46 47pF CENTER U16 MCP601 6 R81 MIC_IN 100 R84 470K R164 +3..ViARM-2378 DEVELOPMENT BOARD +3. A_OUT [ 151 ] . ZD2 BZV55C2V4 R86 100K PS/2 KEYBOARD CONNECTOR .3V VCC R27 R14 1.2K DC1 100nF R11 120E J6 JMP-2 CAN_RX CAN_TX 1. C48 1uF P20 J18 P0.I +3.7 3 + 5 1 7 6 A_OUT 1 EXT INT 10uF/16V INT 1 J32 JMP-2 10 C89 . Ltd.3V 33K JS1 100nF R83 10K 8 7 6 5 DC22 + C88 7 1 47uF/6. . .2K L8 LED L9 LED U8 MCP2551 VCC 3 5 R25 RD2 TD2 VCC VREF 4 1 0E P5 RXD TXD CANH2 CANL2 7 6 CANH CANL 2 8 GND RS 1 2 3 R24 J801-3 10K CAN PORT . VCC R26 R12 1. R48 270E EXT C51 LS1 10E + R137 2 AOUT J17 JMP-2 R91 33K U17 LM386 SPEAKER - 3 P0.2K L7 LED L6 LED U5 MCP2551 VCC 3 5 4 1 R18 RD1 TD1 VCC VREF 0E P4 RXD TXD CANH1 CANL1 7 6 CANH CANL 2 8 GND RS 1 2 3 R13 J801-3 10K CAN PORT . . . . . I SD CARD SECTION.3V CC2 F G E D D_CC SF0 SG0 SE0 SD0 +3.ViARM-2378 DEVELOPMENT BOARD CMOS VCC SCL0 6 7 4 SCL INT U23 PCF8574 C63 22pF U20 PCF8583 1 2 3 4 5 6 7 8 RN1 XTAL1 XTAL2 A0 VSS SDA VCC 1 2 Y4 32.3V +3. U18 15 14 13 1K C55 C56 100nF 1K R101 R100 1K R98 R99 1K R96 R97 C57 100nF 1K G_SEL1 G-SEL2 #SM NC1 NC2 NC3 NC4 NC5 NC6 NC7 NC8 1 2 12 +3.3K 8 7 6 5 R93 3.3K RN SDA0 16 15 14 13 12 11 10 9 VDD SDA SCL INTP7 P6 P5 P4 VCC SDA0 SCL0 RN6 1 2 3 4 3.3V R94 330 2K 33K 33K 33K L14 LED C54 18pF SD CARD CP Vi Microsystems Pvt.. J41 1 JMP-2 2 [ 152 ] . Ltd.3V CC2 a F f g G E e d D 3 A B C DP CC1 SA0 SB0 SC0 SDP0 D_CC LTS543 U19 24LS256 1 2 A B C c DP dpCC1 b A0 A1 VCC Q A2 Q COUT GND R92 3.3V 6 7 8 9 13 R95 MCIDAT0 R146 MCIDAT1 MCIDAT1 R147 MCIDAT2 MCIDAT2 R138 MCIDAT0 R144 33K 15 2 470nH +3.1MF/C +3.3K RN 8 7 6 5 SDP0 SG0 SF0 SE0 C64 22pF DC24 0.3V +3. J40 2 WP 1 JMP-2 SD1 WP1 WP2 CD/DAT3/CS CMD/DI VSS1 VDD CLK VSS2 DAT0 DAT1 DAT2 CP1 CP2 10 R145 33K 14 R143 2K 1 MCIDAT3 2 MCICMD +3.3V R102 1K +3.768KHz 3 5 8 1 2 3 4 SA0 SB0 SC0 SD0 8 7 6 5 3.3V +3.. ..3V MCIDAT3 R139 33K 3 BD3 4 5 1 MCICLK + C58 47uF/6.1MF CMOS VCC A0 A1 A2 P0 P1 P2 P3 VSS DISP1 DC23 0. .3K VCC SCL0 SP5 SMD PAD 2 1 SDA0 4 D_CC 3 I2C SECTION .3V +3.3V VDD VSS 3 DC3 4 100nF MMA7260Q Z_OUT Y_OUT X_OUT 1K 100nF 5 6 7 8 9 10 11 16 XOUT YOUT ZOUT CAN PORT . .9 +3.3V J801-3 R19 100E P3.ViARM-2378 DEVELOPMENT BOARD P21 TRACE. JMP-2 +12V P11 J801-3 +12V RL1 P12 1 2 3 NC1 COM1 NO1 COM2 NC2 NO2 RELAY SPDT D15 COIL1 COIL2 Q2 SL100 1N4001 1 2 3 +3.3V TRACESYNC R33 100E P3.. [ 153 ] ..24 RL2 NC1 COM1 NO1 COM2 NC2 NO2 D16 COIL1 COIL2 RELAY SPDT Q3 SL100 1N4001 8 7 6 5 1 3 5 7 9 11 13 15 17 19 R141 +3.8 TRACEPKT2 TRACEPKT1 TRACEPKT0 TRACESYNC PIPESTAT2 PIPESTAT1 PIPESTAT0 TRACE J19 R135 2 1 JMP-2 10K P27 10K 1 2 3 4 +3. Ltd. 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 RSTTDO RTCK TCK TMS TDI TRST 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 TRACECLK P2. ..26 RELAY SECTION . Vi Microsystems Pvt. ..3V TRST TDI TMS TCK RTCK TDO RST- TRST TDI TMS TDO RN7 R148 TCK R142 10K R157 1 J39 2 RTCK 10K 10K 2 4 6 8 10 12 14 16 18 20 JTAG 10K JTAG SECTION.3V P2. 3V MOTOR VCCJMP3 10 13 12 D7 D8 D9 D10 FR107 FR107 8 14 STEPPER MOTOR SECTION .2PIN 4 8 P9 DC5 0.3K 100nF 100nF C66 10K 3 1 2 3 4 5 3 7 1K R107 1 2 5 FR107 10K 8 7 6 5 1 R104 1 2 3 4 15 1 2 6 5 8 IRED_ANODE IRED_CATHODE VCC1 NC GND IO_P0.5K 5 4 +5V_USB 27 Y1 28 32 1 2 31 6MHZ C79 27pF C80 27pF 30 3 26 13 USBDP RSTOUT# RESET# XTIN TXDEN TXLED# RXLED# XTOUT EECS EESK EEDATA TEST FT232BM PWRCTL PWREN# SLEEP# 25 24 23 22 21 20 19 18 SW2 C81 0.2 P2.6 P2. . .1uF FR107 +3.8 IO_P0.8 P2.6 IO_P0.2K 9 .1MFD TP1 100K TEMP I/P 3 U24 OP07 6 R109 1K TEMP I/P P8 1 2 J801 .1uF C29 9 C27 33nF P3 DC6 0.0 P2.1uF 0. C1 1uF(TAN) + R108 R6 56K 27K -12V -12V DC4 Q1 AD590 0.23 K7 SPI_CS1 SPI_CS2 TDIR RSTRST +3.1uF R20 USB PORT 1. .7 IO_P0.2PIN 7 1 C67 + 1uF(TAN) + -12V 2 - 1 2 J801 .1uF 3 FR107 C77 FR107 C74 .4 P2..3V VCC -12V HEADER Vi Microsystems Pvt.3V +3.3V MOTOR VCC 10uF/16V 4 10K R111 SC R167 R110 7 11 2 4 RXD R106 10K RDIR 6 +3.3V DC8 0. . Ltd.5 P2. SENSOR SECTION .9 VCC SP2 P6 5 PIN RMC RN4 [ 154 ] .3 P2.2K TDIR D3 D4 D5 D6 FR107 U9 L298N 8. . . P17 +12V TEMP. IR1 TFDU4100 C73 VCC TXD 8. .7 P2.1MFD +12V K5 LC_LED7 LC_LED6 LC_LED5 LC_LED4 LC_LED3 LC_LED2 LC_LED1 LC_LED0 SW0 SW1 SW2 SW3 SW4 SW5 SW6 SW7 K1 K2 K3 K4 VCC +12V 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 K6 VCC P2.1 P2. P7 1 2 J801-2 MOTOR VCC 1 2 3 4 FR107 C65 RN3 8 7 6 5 3.9 P0.24 P0. R105 10K TDIR IR SECTION .1uF R23 470E USB SECTION .1uF R119 22K U11 6 DC7 0.ViARM-2378 DEVELOPMENT BOARD +5V_USB +5V_USB BD4 1uH C71 0.1uF RXD0 TXD0 1 2 AVCC VCC1 VCC2 VCCIO USBDM GND2 7 TXD RXD RTS# CTS# DTR# DSR# DCD# R1# J9 JUMPER J11 JUMPER 1 2 1 2 J10 RTS JUMPER CTS R42 RST 330E D11 BAT54 DSR DCD RI 16 12 11 14 15 10 17 8 27E GND1 27E R22 AGND R21 3V3OUT 29 1 2 3 4 +3. Ltd.1MF OLED_TXD OLED_RXD C1- V+ C2+ V- C2T1IN R1OUT T2IN R2OUT GND T1OUT R1IN T2OUT R2IN 16 C59 0.3V J5 RXD1 TXD1 1 2 3 BR VCC 1 2 1 R103 1K SP6 SMD PAD 3 VCC -10V SP7 SMD PAD -10V VCC 2 VCC BR RS DIOW LCD_EN LC_LED0 LC_LED1 LC_LED2 LC_LED3 LC_LED4 LC_LED5 LC_LED6 LC_LED7 CS1 CS2 LCD RST- P2.3V +12V MOSI1 SSEL1 SPI_CS1 P18 2 4 6 8 10 12 14 16 18 20 VCC 1 3 5 7 9 11 13 15 17 19 VCC +3.1 SW 3 2 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 J42 JMP-3 TP2 10K LCD2 1 2 3 -12V LCD RST- G_LCD DISPLAY Vi Microsystems Pvt. .4 P0.1 RSTRXD1 TXD1 2 4 6 8 10 12 14 16 18 20 P0. .2 SW JMP-2 2 OLED SECTION . .ViARM-2378 DEVELOPMENT BOARD P14 1 3 5 7 9 11 13 15 17 19 VCC +3.. [ 155 ] . . .3V -12V SPI_CS5 SPI_CS4 RST- (RIGHT CONNECTOR) HIGH SPEED ADC & DAC .3V -12V SCK1 MISO1 SPI_CS2 SPI_CS3 SCK1 MOSI1 (LEFT CONNECTOR) 2 4 6 8 10 12 14 16 18 20 VCC +3. P28 1 C60 0.1MF 2 OLED_RXD OLED_TXD VCC HEADER 5 6 C62 0.1MF 15 14 13 7 8 +3.3V P2.2 P0.3V J8 1 2 3 1 2 3 P2. .1MF 3 C61 4 0.3V +12V +3. 1 1 VCC J35 JMP-2 2 J34 5 11 12 10 9 C1+ RST- 1 2 3 4 5 +3.5 (RIGHT CONNECTOR) (LEFT CONNECTOR) ZIG BEE SECTION .3 P13 2 4 6 8 10 12 14 16 18 20 1 3 5 7 9 11 13 15 17 19 +3. P15 1 3 5 7 9 11 13 15 17 19 P0.2 P2.3V U21 ICL232 +3. [ 156 ] .5 1 TFT_MOSI 3 P0. .3 1 TFT_SCK 3 P0. . Vi Microsystems Pvt..4 1 TFT_MISO 3 P0.2 1 TFT_CS 3 J22 JM-3 2 MOSI1 2 MISO1 2 SCK1 2 SSEL1 J23 JM-3 J24 JM-3 J25 JM-3 TFT CONNECTOR SECTION . . .ViARM-2378 DEVELOPMENT BOARD LCD1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 VCC BR RS DIOW LCD_EN LC_LED0 LC_LED1 LC_LED2 LC_LED3 LC_LED4 LC_LED5 LC_LED6 R89 LC_LED7 1K VCC RST- VCC N_LCD DISPLAY LCD DISPLAY SECTION . P26 VCC 1 3 5 7 9 11 13 15 17 19 RXD1 TFT_MOSI TFT_SCK +3. Ltd.3V HEADER 10X2 (TFT LCD) P0.3V VCC 2 4 6 8 10 12 14 16 18 20 TXD1 TFT_MISO TFT_CS +3. . U25 MC34063A 1 2 3 IND3 100uH IND1 100uH C68 D2 4 SW_CO DR_CO SW_EM Lpk_S CT GND VCC CI_I/P 8 7 6 R112 1E 5 470pF VCC IN5819 + R116 -12V 680 + 100uF C78 C72 100 Vi Microsystems Pvt.ViARM-2378 DEVELOPMENT BOARD +12V GENERATION . . Ltd. . IND2 100uH U26 MC34063A 1 2 3 D1 C69 4 IN5819 SW_CO 8 DR_CO SW_EM 180E 7 Lpk_S CT 6 VCC GND R114 R118 1E 5 CI_I/P 470pF VCC C76 100/16V + R117 +12V 47K C70 + 100uF/16V R113 5. . R115 20K [ 157 ] .6K -12V GENERATION . . . .8V GENERATION .5V GENERATION . .1mF R7 330E R2 330E VCC D13 1N4148 L1 LED CMOS VCC R140 15E BT1 3. + VIN VOUT 2 ADJ VOUT ADJ VIN 1 + VCC U2 LM317 3 C14 10MF/16V +2.1mF + R16 330E R5 47E C6 + 470MF/35V/E C7 10MF/16V/E C2 0.1mF R4 10E R3 47E 2 U1 LM317 3 + +1.ViARM-2378 DEVELOPMENT BOARD 2 C11 10MF/16V U3 LM317 3 +3. [ 158 ] . 1 VCC +3.3V + R17 100E C9 470MF/35V/E + C10 10MF/16V/E +2. .8V + R10 100E C15 470MF/35V/E + C16 10MF/16V/E VCC C5 0. . .3V LITHIUM BATTERY D14 1N4148 R1 330E SP1 1 2 3 1 2 3 +9V VCC SMD PAD (POWER ON LED) VCC SW1 1 2 3 1 2 3 P10 VCC GND CASIO SOCKET POWER ON/OFF SW Vi Microsystems Pvt.3V GENERATION ..5V C3 0. . . ADJ VOUT ADJ C17 10MF/16V VIN 1 + +9V U4 LM317 3 1 VCC +1. VIN C8 10MF/16V VOUT 2 VCC GENERATION .1mF + R9 100E R8 120E C12 + 470MF/35V/E C13 10MF/16V/E C4 0. Ltd. Ltd.ViARM-2378 DEVELOPMENT BOARD APPENDIX – B COMPONENT LAYOUT Vi Microsystems Pvt.. [ 159 ] . [ 160 ] . Ltd..ViARM-2378 DEVELOPMENT BOARD Vi Microsystems Pvt.
Copyright © 2024 DOKUMEN.SITE Inc.