PIC MicroBoard Manual

Size: px
Start display at page:

Download "PIC MicroBoard Manual"

Transcription

1 PIC MicroBoard Manual 5 th Edition Sept 2002

2 How to use this manual. In an effort to enable students with the appropriate skill set needed to make this course as rewarding as possible, I have divided this manual into four parts. There is a lot of material here but you may not to need use all of it for your project. PARTS I. The MicroBoard: Design and Assembly - This part introduces the features of the MicroBoard and gives some background information on its design. A MicroBoard assembly guide is included here. II. III. IV. Getting Started: Programming the PIC - The second part provides you with a brief review of assembly language programming and the PIC instruction set. Here you will find a template that you can use as a starting point for writing your own assembly language program. This part concludes with instructions on assembling your assembly language program and downloading object code to the PIC microcontroller. The MicroBoard In Action - This part contains the information you need to make your MicroBoard actually do something. It begins by introducing the operation of the MicroBoard in Hosted mode and will outline some of the methods you can use to test drive your board. It then steps through the features of the PIC microcontroller, one-by-one, complete with instructions, diagrams, sample code and working examples. Equipped with the information provided here, you will be able to unleash the full capabilities of the MicroBoard. Appendices - These are referenced by the three previous parts. Feel free to detach the appendices from the bulk of this manual; you will likely refer to them often. This manual is intended to be a supplement to the PIC16F87X data sheet, which can be downloaded from the EE401 website ( The PIC16F87X data sheet includes absolutely everything you will need to know about the PIC16F87X microcontroller and this user manual refers to it often. Another helpful reference is the PICmicro Midrange Reference Manual, which can also be found on the EE401 website. I would sincerely recommend taking the time to read this entire manual from beginning to end and to familiarize yourself with the data sheet; the things you will learn along the way will be helpful when it comes to designing your own project. Be aware, however, that completion of this manual will merely lay the groundwork for more interesting, albeit more useful, applications of the MicroBoard. Keep in mind that the MicroBoard is just the central nervous system of your project. You are responsible for the design of the extraneous circuits that your project will utilize (sensors, motors, etc ). It would be prudent to make your initial circuit designs on an SK10 board, then later transfer your design to a computer using EAGLE to have it milled into a clean PCB. In general, rats nests of wires don t hold up very well and, in accordance with Murphy s Law, will inevitably let you down when you need them the most (during demonstrations of course!). Contributors This document was created by contributions from: Dave Bull, Ben Bathgate, Mike Cumming, Patrick Pilarski, Paul Bartosek and Loren Wyard-Scott.

3 Table of Contents Part I The MicroBoard: Design and Assembly 1.0 Introduction to the MicroBoard 1.1 MicroBoard Specifications 1.2 Functional Description DC Power Supplies RS-232 Serial Interface 2.0 MicroBoard Assembly Part II Getting Started: Programming the PIC 3.0 Programming the PIC Microcontroller 3.1 Assembly Language Programming 3.2 Memory Structure 3.3 Instruction Set Mathematical Operations Flow Control 3.4 Subroutines 3.5 Interrupts 3.6 Putting It All Together 4.0 Assembling Your PIC Program 4.1 Writing Your Program to the PIC Part III The MicroBoard In Action 5.0 Debug87x 5.1 Hardware Flow Control 6.0 Peripheral Features 6.1 I/O Ports Port A (and Port E) Port B Port C Port D Using Digital I/O Ports Example Using I/O with Debug87x.hex 6.2 Parallel Slave Port (PSP) Module PIC16F877 only Using the Parallel Slave Port Example 6.3 Timer Modules 6.4 Master Synchronous Serial Port (MSSP) Serial Peripheral Interface (SPI) Adding Additional Outputs Using Shift Registers and SPI Using SPI with Debug87x.hex Using the LCD with Debug87x.hex Writing a C Program To Control The LCD 6.5 Universal Synchronous Asynchronous Receiver Transmitter (USART) Using the USART with a Personal Computer Writing a C Program To Send Text To A Terminal Window 6.6 Pulse Width Modulator (PWM) Using the Pulse Width Modulator with Debug87x.hex

4 6.6.2 Digital-to-Analog Converter Using PWM 6.7 Analog-to-Digital Converter (A/D) Module Using A/D with Debug87x.hex Part IV Appendices Appendix A - PIC16F873 MicroBoard Assembly Package A1 Parts Kit List A2 Assembly Checklist A3 Schematic Diagram (Eagle) A4 Board Layout Diagram (Eagle) A5 Power Checklist Appendix B - PIC16F877 MicroBoard Assembly Package B1 Parts Kit List B2 Assembly Checklist B3 Schematic Diagram (Eagle) B4 Board Layout Diagram (Eagle) B5 Power Checklist

5 Part I The MicroBoard: Design and Assembly

6 1.0 Introduction to the MicroBoard The MicroBoard is a compact, low power controller board that is based on the Micro-Chip Technologies PIC16F87X series microcontroller. The PIC is the heart and soul of the MicroBoard, containing the central processing unit for the board. The MicroBoard will be common to all projects with the addition of student designed and built circuits. The PIC MicroBoard used in the EE401 project course comes in two flavors: 1. The first generation MicroBoard based on the PIC16F873 microcontroller. 2. The new and improved MicroBoard based on the PIC16F877 microcontroller. Both MicroBoards come loaded with the following features: Support for Built-in Motor Drivers: each capable of driving a bipolar stepper motor, two bidirectional DC motors, or four unidirectional DC motors. * The PIC16F873 MicroBoard is equipped with 3 built-in motor drivers whereas the PIC16F877 MicroBoard includes only one. Communication Interfaces: RS-232 communication with a PC; SPI and I 2 C busses for communicating with other chips; and standard 5V CMOS digital I/O for anything else. * The PIC16F877 MicroBoard supports Parallel Slave Port Communication. Extra Features: Three timer modules, a multi-channel analog-to-digital converter, and two pulsewidth-modulated outputs. Additional Features of the PIC16F877 MicroBoard: Easy interface with an LCD, built-in programming module that allows you to program other PIC microcontrollers using your MicroBoard. Two modes of operation are available for the MicroBoard. Hosted mode: The MicroBoard runs a program that allows control of most of its functions through a serial link to a desktop PC (see section 5.0). Autonomous mode: More powerful than hosted mode, autonomous mode uses assembly code you have written and then burned to the PIC (see section 3.0). Complete with a relatively powerful processor and large I/O capability, the MicroBoard is an impressive control system. The range of projects is virtually limitless: you can control robots, perform wireless communication, carry out digital signal processing, or even connect your MicroBoard to the Internet. The only limit is your imagination.

7 1.1 MicroBoard Specifications This table lists the electrical characteristics of the MicroBoard, exceeding maximum values will very quickly damage your board. PIC16F873 PIC16F877 Total Number of Pins on PIC (DIP package) Range of Input Voltage to Barrel Connector PIC Supply Voltage Clock Speed 6-18 Vdc 5 Vdc 4 MHz (Upgradeable to 20 MHz)* Digital I/O Pins Analog to Digital Channels 5 (multiplexed) 8 (multiplexed) Pulse Width Modulated Pins 2 On-board Programming Module No Yes Parallel Slave Port Module No Yes 10 Pin LCD Interface No Yes Power Consumption with all IC s Power Consumption with no L293s Max current drawn from +12Vdc connector Max current drawn from +5Vdc connector Max current drawn from -12Vdc connector Table 1.1 MicroBoard Specifications * See the course instructor for details in regards to upgrading the clock speed. 1.2 Functional Description Vdc Vdc 500 ma 500 ma 50 ma The MicroBoard is designed in a modular manner as shown in the block diagram below. Refer to the MicroBoard schematic and board layout diagrams (found in appendix) as necessary to improve your understanding. Figure 1.1 Block Diagram of the MicroBoard Design

8 1.2.1 DC Power Supplies Figure 1.2 DC Power Supplies Schematic DC power is supplied to the board through a 2.1mm coaxial barrel connector with center positive polarity. Normally this power comes from a 9Vdc 500mA wall adaptor plugged into the barrel connector. However, a 12Vdc 1A wall adaptor or suitably sized battery array can also be used. In the lab you will find connectors that allow you to connect your MicroBoard to a DC power supply. Diodes D1 and D2 provide some reverse polarity protection and power supply transient isolation. Capacitors C1 and C2 provide power supply bulk charge storage while C3-C6 provide additional power supply transient isolation for their respective supplies. IC1 (7805) regulates the bulk supply to the +5Vdc needed for the PIC micro-controller and logic devices (logic side of the L293 and MAX232). IC2 (7812) and its components regulate the bulk supply for the voltage inverter, IC3, and are only installed if IC3 is to be used. IC3, the ICL7662P, and capacitors C9- C14 provide a negative voltage for analog circuits such as dual supply op-amp circuits. You will notice that the polarized capacitors have a non-polarized capacitor in parallel with them. This is not always necessary in designs but is here. The reasoning is that real capacitors are not ideal capacitors: larger capacitors tend to have greater amounts of intrinsic inductance associated with them due to their construction. Their greater inductance gives them poorer high frequency performance. Smaller capacitors tend to have better high frequency performance. Therefore, multiple real capacitors are used to approximate the required ideal capacitor performance.

9 1.2.2 RS-232 Serial Interface Figure 1.3 RS-232 Serial Interface Schematic The RS-232 circuitry consists of a DB9 female connector, the MAX232 and related circuitry. The DB9 connector is configured for an IBM PC-style 9-pin RS-232 connection. The MAX232 converts the RS-232 (sometimes called the HIN232) +/-12V signals to logic levels for the micro-controller. The resistors R31 and R32 (330Ω) limit line slew rates and provide some short circuit protection. The resistors R23, R24 (not shown here, see Appendix A Microboard Schematic Diagrams), R33 and R34 provide output contention protection (contention is created if the Digital I/O pin of PIC incorrectly configured as an output and is connected to the output of the MAX232). C24 C25 are used by the on-board charge-pump (note that the supply is +5V and yet the IC can deliver RS-232 level signals).

10 2.0 MicroBoard Assembly In the appendix you will find an assembly package for each of the MicroBoards. Appendix A includes the assembly package for the PIC16F873 MicroBoard and Appendix B includes the assembly package for the PIC16F877 MicroBoard. The first thing you should do when you get your MicroBoard kit is check to see if you have all of the components necessary to assemble it. A parts kit list is included in the assembly package. If you are missing parts go harass the TA. To assemble your MicroBoard you will need the following items: Soldering Iron. 63/37 electronic grade rosin core solder. Flux pen. Needle nose pliers for forming leads. Side cutters for cutting leads. If you are not familiar with soldering and circuit board assembly you may want to read Appendix C Soldering Tips before continuing. If you have questions about MicroBoard assembly don t hesitate to ask your TA. That s what they are there for. You can waste a lot of time and effort simply finding and repairing a bad solder joint. Do it right the first time and your life will be more pleasant. Remember these axioms whenever working with electronics. Keep it clean. It is easier to keep electronics clean than to clean electronics. Contamination may cause problems: a simple fingerprint will etch a copper trace and foul a solder connection; a fingerprint or leftover flux residue can act as an undesirable resistor. Keep it cool. Use the correct soldering techniques and temperature. High temperatures will destroy components or shorten life times. Minimize stress. Miniaturization means less mechanically robust component packaging. Allow for thermal expansion, mechanical flexing, and component movement. Do not pull leaded components too tightly to the board. The MicroBoard schematics and board layout diagrams are included in the assembly packages. Use these to locate the placement of the components on the MicroBoard. In your assembly package you will also find an assembly checklist. It is recommended that you solder the components in that order, checking them off as you go. WARNING! Do not solder ICs directly into the board! Solder the IC sockets. When the assembly of your MicroBoard is complete you should test the power supply circuitry before installing any ICs. Your assembly package includes a power checklist that guides you through this process. Now that your MicroBoard is assembled and working properly you can do one of two things: 1. Learn how to program it (see section 3.0) 2. Program the PIC with debug87x.hex and explore the features of the PIC16F87X microcontroller (see section 5.0).

11 Part II Getting Started: Programming The PIC

12 3.0 Programming the PIC Microcontroller The main focus of this manual is assembly language programming of the PIC microcontroller. You will have access to a C compiler in the EE401 lab, however, the discussion on programming the PIC in C is limited and you will likely need to seek other resources. 3.1 Assembly Language Programming Here we will review some of the basics of assembly language programming. First it is important to understand the memory structure of the PIC16F87X microcontroller. For detailed information on memory structure see section 2.0 in the PIC16F87X data sheet. 3.2 Memory Structure There are three memory blocks: 1. Program memory 2. Data memory 3. EEPROM data memory 1. Program Memory The program memory is, as you may have guessed, the section where your program instructions are stored. The size of the program memory for the PIC16F873 is 4Kx14 which means that it can hold 4x1024= bit instructions. The program memory for the PIC16F877 is 8Kx14. The program memory is divided into 2K blocks called pages. Thus, the PIC16F873 has 2 pages of program memory and the PIC16F877 has 4 pages. In order for commands on a certain program memory page to be executed the corresponding page must be selected. To switch between program memory pages use the pagesel directive. A recommended way to use the pagesel directive is to first define the following values at the beginning of your assembly language program as follows (also see section 3.6): page0 EQU 0x0000 ; start address of page0 page1 EQU page2 EQU 0x0800 0x1000 ; start address of page1 ; start address of page2 page3 EQU 0x1800 ; start address of page3 Then to select a page, say page 2 for example, use the following in the body of your main program: pagesel page2 ; selects program memory page 2 2. Data Memory The data memory is divided up into 4 banks (bank 0-bank 3) that contain both Special Function Registers and General Function Registers. See Figures 2-3 and 2-4 in the PIC16F87X data sheet for register file maps. The special function registers are named and have a predefined function. They are used for controlling the operation of the microcontroller. Some of the more important Special Function Registers are outlined in section of the PIC16F87X data sheet. General function registers are used for data storage. The PIC16F873 has bit general function registers. The PIC16F877 has an additional bit general function registers (368 in total). To access a register in a certain data memory bank you must ensure that the appropriate bank is selected. The status of the bank select bits, RP0 and RP1 (located in the STATUS register), determine which data memory bank is active. See section 2.2 in the PIC16F87X data sheet for a table of bank select bits. For example, to access the general purpose register at address 0xA0 you must select bank 1 (i.e. RP1:RP0 =01).

13 The banksel directive can also be used to select the desired data memory bank, similar to the way in which the pagesel command is used to select the desired program memory page. First define the following values: BANK0 BANK1 EQU EQU 0x0000 0x0080 ; Data Memory start positions BANK2 EQU 0x0100 BANK3 EQU 0x0180 Then to select the bank, say bank1 for example, use the following in the body of your main program: banksel BANK1 ; select data memory bank 1 3. EEPROM Memory The EEPROM memory is nonvolatile meaning its contents are not erased when you turn off the power to the PIC. This is useful for storing information such as the state of your system before it is powered-down since this information can then be retrieved when the system is powered-up again. Data stored in the Data memory section (RAM) is erased when the power is removed from the PIC. For instructions on using EEPROM see section 4.0 in the PIC16F87X data sheet. 3.3 Instruction Set The PIC16F87X uses a RISC-based architecture with only 35 instructions. See section 13.1 in the PIC16F87X data sheet for instruction descriptions. Some of the more common instructions will be reviewed here. An instruction is either byte-oriented or bit-oriented. The following bits of a register. bcf bsf STATUS, RP0 STATUS, RP1 ; Clear the RP0 bit in the STATUS register. ; Set the RP1 bit in the STATUS register. ; Anything after a semicolon is a comment. Remember that the RP0 and RP1 bits are used to select the data memory bank. The instructions above will select bank 1 (i.e. RB0:RB1=01). The following is an example of a byte-oriented instruction. clrf STATUS ; Clear the entire STATUS register. Many instructions use the W register, which you can think of as a temporary storage place. To store a value in one of the general purpose registers, say at address 0x20 (in bank 0), you could use the following commands: bcf STATUS, RP0 ; select bank 0 bcf STATUS, RP1 movlw movwf 0x35 0x20 ; writes 0x35 to the W register ; moves the value from the W register to the ; general purpose register at address 0x20 To make your code more readable you can define labels to replace numerical values. These labels are defined at the beginning of your program using the EQU (equate) assembler directive. length EQU 0x35 ; Equate the label length with value 0x35. lreg EQU 0x20 ; Equate the label lreg with value 0x20. With these defined the above instructions could now be replaced with: movlw length ; Load the W register with the value 0x35.

14 movwf lreg ; Move the value from the W register to the ; general purpose register at address 0x20. An additional benefit to using labels is that if you decide to change any one of the values in your source code, you need to only change the value of the label rather than having to search through your entire source code for every occurrence of that value Mathematical Operations Mathematical operations can be difficult since the instruction set includes commands only for addition and subtraction and there are no hardware floating-point operations. If you require this functionality in your code, there are some software emulation libraries that can be found on the MicroChip website ( but they are not always easy to find. Try a search for math emulation. When programming in C, many of the advanced math functions are available to you. addwf lreg, W ; Add the contents of W and lreg and stores ; the result in W. Here the W register is the destination for the result of the addition, as specified by the second argument to the instruction. Alternatively, you can specify lreg to be the destination register by replacing W with F (file). addwf lreg, F ; lreg is now the destination register Flow Control You can control the flow of your program using conditional or unconditional branches. Conditional branches (i.e. btfss, btfsc, incfsz, decfsz) test the value of the operand and branch accordingly. An example of an unconditional branch is the goto instruction. A useful technique to use with flow control is labeling. You can label locations in your program and branch to that location using the label name. For example: bcf bcf STATUS, RP0 STATUS, RP1 ; Select bank 0. LOOP decfsz lreg, F ; Decrement the value in the lreg ; register and skips the next ; instruction if the result is 0. goto goto LOOP ZERO ; Branch to LOOP if result not 0. ; branch to ZERO if result is 0. : : ZERO {instructions} : 3.4 Subroutines Using subroutines is a way to make your program modular. It also shortens the length of your main program making it easier to follow. You can think of subroutines as mini programs that are called from the main program. Subroutines are usually defined after the main program. Consider the code below: main {main program instructions} : call incw : ; call incw subroutine

15 goto main ; return to beginning of main program ; subroutines are declared here incw incf W incf W incf W return ; increment the value in the W register 3 times ; return to main program Here a subroutine called incw is defined. The purpose of the subroutine is to increment the value in the W register 3 times. In the main program you call the subroutine using the call instruction with the subroutine name as the operand. When the call command is executed the main program jumps to the incw subroutine, executes the commands defined there, then returns to the main program when the return instruction is executed. Unlike many other microcontrollers, the PIC contains no user-accessible stack. Adding the fact that the programmer s model contains only one working register, subroutines passing more than a single byte need to make use of the file register memory. Additionally, the stack in the PIC16F87X devices is only 8 locations deep. Recursive calling is thereby discouraged. Interrupts, described next, also require stack locations and reduce the possible call-depth. 3.5 Interrupts Interrupts are an alternative to polling for events and can make processing time more efficient, since your program doesn t need to wait for selected events to occur by polling. Every time a selected event triggers an interrupt, the PIC stops execution of the program and jumps to the interrupt service routine. Once finished, the PIC resumes normal execution of your program, where it left off. Each of the built-in modules has the ability to cause an interrupt for one reason or another. The ADC, for example, can cause an interrupt when it has completed a conversion while the UART can produce an interrupt when its transmit buffer is empty or when its receive buffer is full. When an interrupt occurs, the PIC jumps to the program memory location 0x0004, the interrupt vector. The program space available in this location is very limited so it s recommended that you place your interrupt service routine (ISR) elsewhere in program memory and just put a GOTO command in the interrupt vector space (see the example program in section 3.6). Instructions on writing Interrupt Service Routines (ISRs) are provided in section of the PIC16F87X data sheet. Compared with other microcontrollers, the PIC16F87X family has a few notable differences with respect to interrupt processing. 1. Only one interrupt vector is used. Your ISR must determine (through status bits) which subsystem generated the interrupts. 2. Context of the CPU is not saved, except for the return Program Counter. Your ISR must be written to compensate for this. 3. Each interrupt uses one internal stack location until processing is complete. Only 8 stack locations are available and subroutine calls also use them. Due to this limitation, use of nested interrupts is discouraged. However, nesting is disabled by default. 3.6 Putting It All Together Now you are almost ready to write our own PIC assembly program. You can use any text editor to write your source code as long as you save it with a.asm extension. It is recommended that you use MPLAB, a free program provided by Microchip, to write and compile your source code. You can download a copy of MPLAB from the Microchip website ( or from the EE401 website. There is a copy of MPLAB installed on each of the computers in the EE 401 lab.

16 Below is a very simple program that is used to show the necessary components for an assembly program. Also, MPLAB contains source code templates (f873temp.asm and f877temp.asm), which can be found in mplab/template/code/. You can use these as a starting point. ;************************************************************ ; * ; This is a program header. Here you give a brief * ; ; description of what your program does and any other important information about it. You should include * * ; the name of the program, your name, the date you * ; ; wrote the program and/or the last date it was modified. Include a course name if applicable. * * ; * ; ; name: example.asm date: 9 July 2002 (program name) (date created) * * ; created by: David R. Bull (that s me) * ; ; course: EE401 * * ; This program doesn t do anything (since there are no * ; ; instructions in the main program). It is just used * to illustrate the necessary components of an assembly * ; language program for the PIC microcontroller. * ; * ;************************************************************ list p=16f873 ; this tells MPLAB which PIC ; microcontroller you are using. ; use p=16f877 when necessary. #include <p16f873.inc> ; this file defines the names and ; locations of all the Special ; Function Registers (i.e. W register) ; use p16f877.inc when necessary. ; The following commands set the PIC s configuration bits. For now ; you don t really need to understand how the configurations bits ; affect anything, but if you really want to see section 12.1 in the ; PIC16F87X data sheet. ; You can also set the configuration bits manually when you are ; downloading your program to the PIC (see section 4.1) CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_OFF & _XT_OSC & _WRT_ENABLE_ON & _LVP_OFF & _CPD_OFF ; Label Definitions TEMP1 EQU 0x20 TEMP2 EQU 0x21 BANK0 EQU 0x0000 ; Data Memory start positions BANK1 BANK2 EQU EQU 0x0080 0x0100 ; for use with banksel directive ; see section 3.2 BANK3 EQU 0x0180 page0 EQU 0x0000 ; program memory start positions page1 EQU 0x0800 ; for use with pagesel directive page2 EQU page3 EQU 0x1000 0x1800 ; see section 3.2 ; This is where your program code begins ORG 0x00 ; when the PIC is powered up or after a reset ; the instruction at address 0x00 is the first ; to be executed. The ORG instruction tells ; the device programming the PIC to start ; writing the following instructions at the ; address indicated (in this case at address ; 0x00). clrf PCLATH goto main ; selects page0 of the program memory ; jumps to beginning of your program

17 ; Only include this next section if you are using interrupts. ORG 0x04 ; when an interrupt occurs the program jumps ; to the instruction at address 0x04 goto service ; jumps to the subroutine service, which will ; handle the interrupt. ; this is the start of your main program main {the instructions for your main program go here.} ; this is the interrupt service routine service {the instructions for your interrupt service routine go here.} END ; this is the end of the program. The source code for some example programs are available on the EE401 website. It may help to take a quick look at the code to become more familiar with the contents of an assembly language program.

18 4.0 Assembling Your PIC Program To actually make your MicroBoard do anything, it needs to be running a program. Since you ve probably not written anything yet, a multi-talented program has been supplied for you. Well, actually two programs have been written (debug873.asm and debug877.asm); one for the PIC16F873 MicroBoard and the other for the PIC16F877 MicroBoard. They are essentially the same program but are tailored to suit the slight differences between the two MicroBoards. Thus, from now on, I will simply refer to these two programs as debug87x.asm. You can find a copy of these programs on the EE401 website. In this section you will use MPLAB to compile debug87x.asm (you can also use MPASM but instructions will not be given here). In the next section you will burn the program s object code, debug87x.hex, to your microboard. To assemble the program, follow these steps: 1. Open MPLAB 2. Open your source code file (debug87x.asm) 3. In the Project menu select Build Node And that s it. A new window will open that shows the results of the process. If your source code is error free the message Build Completed Successfully. will appear in this window. Assembling generates a *.hex file (in this case it will be debug87x.hex) and places it in the same directory as your source code file. This is the file that you will download to the PIC microcontroller. You can also download the *.hex files from the EE401 website. If there are errors in your code then this window will contain the appropriate error messages. 4.1 Writing Your Program to the PIC The PIC has a flash type program memory, which can be written, erased and rewritten. This is very useful for debugging (you can test out the capabilities and connections of your circuitry before letting your project run amuck). Typically the flash memory can go through several thousand of these cycles so you don t need to worry about it breaking down on you. You will need to use the computer in the EE401 lab with a PICSTART Plus Development Programmer connected to it (see figure 4.1 below). Now we will download debug87x.hex onto the PIC.

19 1. Open MPLAB 2. Ensure that the PICSTART Plus is connected to the computer and that the power cord is plugged in. 3. Put your PIC chip in the uppermost position in the socket on the PICSTART Plus, with the notch on the PIC pointing to the top. Figure 4.1 *** WARNING *** Do NOT put your chip in the PICSTART upside-down or you will permanently damage the programmer or destroy your PIC! 4. Choose PICSTART Plus>Enable Programmer. The window shown in Figure 4.2 will open if the programmer is attached correctly. If the box does not appear, check the connections and try again. 5. Select the PIC device that you are using (either PIC16F873 or PIC16F877). 6. Choose File>Import>Import To Memory and select your program file (debug87x.hex). 7. Click on the Configuration Bits button. A new window should open (shown below); select the options shown in Figure 4.3. Figure 4.2 Figure Finally, click the Program button to burn your program to the PIC. You will receive a message notifying you if the program was transferred to the PIC successfully. Take the PIC out of the programmer, plug it back into your MicroBoard, and you re ready for business.

20 Part III The MicroBoard In Action

21 5.0 Debug87x When the MicroBoard is running debug87x.hex you can control many of its functions through a serial link to a personal computer. HyperTerminal (or other terminal program) is used to communicate with the MicroBoard in a command-prompt fashion. Using and configuring HyperTerminal is very easy, just follow these steps: 1. Open HyperTerminal (in the start menu) 2. Enter a name in the box and click OK (any name will do). 3. Select either Direct to COM1 or Direct to COM2 in the Connect Using menu then click OK. Most PCs will have 2 serial ports (COM1 and COM2) and either one can be used. Make sure that if you select COM1 you connect the serial cable to the COM1 serial connection on the back of the PC and vise versa. 4. Select 9600 in the Bits Per Second menu. This is the Baud Rate. 5. Select 8 in the Data Bits menu. 6. Select None in the Parity menu. 7. Select 1 in the Stop Bits menu. 8. Select None in the Flow Control menu (select Hardware if you are using hardware flow control). 9. Click OK. You should now see a window before you that is blank and has a blinking cursor in the upper left corner. Connect your MicroBoard to the PC using a computer serial cable. Then connect the MicroBoard to the power supply. If your MicroBoard is working properly a help menu will appear in this window. This help menu provides you with a list and brief description of the commands used to control the different MicroBoard modules. These commands are also discussed in the following sections of this user manual. To initiate a command simply type it in at the prompt and press ENTER. Debug87x ignores uppercase commands, letters and hexadecimal numbers. With hardware flow control enabled you can send a string of commands to the PIC all at once (like a script) and the PIC will execute the commands in the order they are received (for an example, see section 6.1.6). If you are using the PIC16F873 the default state for hardware flow control is disabled. See the following section (section 5.1) for instructions on enabling hardware flow control. If you are using the PIC16F877 hardware flow control is already enabled. To create a script, simply save to a text file a set of commands in the order you would like them carried out. Start a HyperTerminal session and select Transfer > Send Text File Choose your saved script. The commands will be sent to the PIC and executed one by one. In the future, you may want to use the subroutines in debug87x as part of your own program. If you modify the contents of debug87x or write your own program from scratch, you ll need to compile and burn the new program to your PIC using the procedure discussed in sections 4.0 and Hardware Flow Control Hardware flow control is a method to control the flow of data from one device to another using hardware generated handshaking signals. On your MicroBoard pins RB1 and RB2 are used to implement the handshaking signals. RB2 is an output and is connected to the CTS (Clear to Send) pin of the DB-9 connector. When ready to receive data from the PC this pin is set low (active low). To stop the PC from sending data this pin is set high again. RB1 is an input and is connected to the RTS (Request to Send) pin of the DB-9 connector. The PC will signal it is ready to receive data by setting this pin low (active low). If you are using the PIC16F873 MicroBoard follow these steps to enable hardware flow control. Hardware flow control is already enabled on the PIC16F877 MicroBoard. 1. Add two 470Ω resistors at positions R33 and R34 (beside the MAX232 chip). 2. Solder a wire from the end of R34 (end closest to DB9 connector) to pin RB1 on the PIC. 3. Solder a wire from the end of R33 (end closest to DB9 connector) to pin RB2 on the PIC.

22

23 6.0 Peripheral Features To make your programming less stressful, the wonderful folks over at Microchip have built several modules into the microcontroller you will be using. These modules automate certain processes, such as timing, serial communication, pulse width modulation and analog to digital conversion. Each of these modules have their own registers to control their operation; once they are set your code will continue to execute in parallel with the operation of the modules. These peripheral features are discussed in detail in the PIC16F87X data sheet and the PICmicro Mid-Range Reference Manual, which can both be downloaded from the EE401 website. The information in the following sections is meant to supplement the information in these documents. In these sections you will find: 1. Instructions on writing your own assembly language code to control the modules. 2. Instructions on using debug87x.hex to control the modules. 3. Writing C programs to control the modules. 4. Examples to illustrate what you can do with them. 6.1 I/O Ports The PIC16F873 has 22 I/O pins, divided into 3 ports (Port A-Port C), which can be configured in various ways to communicate with many different peripheral devices. The PIC16F877 has an additional 11 pins (33 in total) that are divided into 2 ports (Port D and Port E). Port A has 6 pins, Port B-Port D each have 8 pins and Port E has 3 pins. Many of these pins are multiplexed with more than one function. You can control the function of each pin (or group of pins) by writing the proper value to the appropriate Special Function Register. The simplest function for these pins is general purpose digital I/O. You can configure any pin as a digital output and set its value high (+5V) or low (0V), or configure it as a digital input and read its present value. Each port has an associated PORTx register (bi-directional port) and a TRISx register (data direction register). Setting a bit in the TRISx register makes the corresponding pin an input, clearing the bit makes it an output. For example, setting bit 4 in the TRISB register makes pin RB4 an input. Setting a bit in the PORTx register sets the corresponding pin high (as long as it is configured as an output). Clearing the bit set the pin low. For example, setting bit 3 in the PORTC register sets the output pin RC3 high. Data is input by reading from the PORTx register. The following code is an example of how to implement this in your program. bsf STATUS, RP0 ; select bank1 bcf STATUS, RP1 movlw B ; configure RB7:RB4 as inputs movwf TRISB ; configure RB3:RB0 as outputs bcf STATUS, RP0 ; select bank0 movf PORTB, W ; reads inputs and stores in W register movlw B 1010 ; sets outputs RB3 and RB1 high, movwf PORTB ; RB2 and RB0 low Each port, and the alternate function(s) of its pins, is discussed in its own section below. Refer to section 3.0 of the PIC16F87X data sheet for additional information on I/O ports Port A (and Port E) In this section ports A and E are discussed together since they both are multiplexed with analog inputs (with the exception of pin RA4, which is multiplexed with the Timer0 module). Port E is available on the PIC16F877 only. The function of each pin in these two ports is selected using the A/D port configuration

24 control bits (the lower four bits of the ADCON1 register). Refer to Section 11.0 (Register 11-2) in the PIC16F87X data sheet for a table of the A/D port configuration control bits. For example, to configure all the pins in ports A and E for general purpose digital I/O you must write B 011x (B 0110 or B 0111 ) to the lower four bits of the ADCON1 register. (PIC16F873 only) Pin RA4 has a weak internal pull-up. If you will be using this pin for digital I/O you must connect an external pull-up resistor. The analog inputs are used with the Analog-to-Digital Converter (A/D) module. See section 6.7 for instructions on using the A/D module. The ADON bit (ADCON0<0>) controls whether or not the A/D module is operating. If you are not using the A/D module then it is recommended that you turn it off by clearing the ADON bit. (PIC16F877 only) The three pins in port E also function as control inputs for the Parallel Slave Port (PSP) module. To disable the PSP module clear the PSPMODE bit in the TRISE register. See section 6.2 for more information on the PSP. Data is read from/written to ports A and E using the PORTA and PORTE port registers, respectively. The data direction registers are TRISA and TRISE. Table 6.1: Summary of Registers Associated with PORTA and PORTE. Name Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PORTA 0x05 RA5 RA4 RA3 RA2 RA1 RA0 TRISA 0x85 PORTA data direction bits. PORTE 0x05 RE2 RE1 RE0 TRISE 0x85 IBF OBF IBOV PSPMODE PORTE data direction bits. ADCON0 0x1F ADCS1 ADCS0 CHS2 CHS1 CHS0 GO/DONE ADON ADCON1 0x9F ADFM PCFG3 PCFG2 PCFG1 PCFG0 The following code shows how ports A and E can be initialized for digital I/O: bcf STATUS, RP0 ; select bank0 bcf STATUS, RP1 clrf PORTA ; clear ports A and E to initialize clrf PORTE bsf STATUS, RP0 ; select bank1 bcf STATUS, RP1 movlw b 0110 ; configure ports A and E for movwf ADCON1 ; digital I/O movlw b ; set RA5:RA3 and RE0 as inputs movwf TRISA ; RA2:RA0 and RE2:RE1 as outputs movlw movwf b 001 TRISE Port B Three of the pins in Port B are multiplexed with the low voltage programming option. The low voltage programming option allows PIC microcontrollers to program by one another. Refer to the Special Features Section in the PIC16F87X data sheet for instructions on using this feature. Pins RB7:RB4 have an interrupt on change feature, which is discussed in section of the PIC16F87X data sheet. Pins RB1 and RB2 are reserved for hardware flow control (see section 5.1) and can only be used for digital I/O if hardware flow control is not being used.

25 Data is read from/written to port B using the PORTB port register. The data direction register is TRISB. Table 6.2: Summary of Registers Associated with PORTB. Name Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PORTB 0x06 RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 TRISB 0x86 PORTB data direction bits. OPTION_REG 0x81 RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS Port C Port C is shared by many of the peripheral functions, such as the timer modules, the pulse-width-modulator, the analog-to-digital converter and the serial communication modules. Refer to the corresponding peripheral section for the appropriate PORTC settings. Data is read from/written to port C using the PORTC port register. The data direction register is TRISC. Table 6.3: Summary of Registers Associated with PORTC. Name Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PORTC 0x07 RC7 RC6 RC5 RC4 RC3 RC2 RC1 RC0 TRISC 0x87 PORTC data direction bits Port D (PIC16F877 Only) Port D is multiplexed with the Parallel Slave Port (PSP) module. To disable the PSP module the PSPMODE bit (TRISE<4>) must be cleared. Data is read from/written to port D using the PORTD port register. The data direction register is TRISD. Table 6.4: Summary of Registers Associated with PORTB. Name Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PORTD 0x08 RD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 TRISD 0x88 PORTD data direction bits. TRISE 0x85 IBF OBF IBOV PSPMODE PORTE data direction bits Using Digital I/O Ports Example The source code to accompany this example (flashall.asm and flash_c.c) can be found in the PIC Code section of the EE401 website. When you first put your MicroBoard together it is a good idea to test if the I/O ports are working properly. You can use the program flashall.asm as one test method. This program configures all ports as digital I/O outputs and continually toggles the outputs. The delay between switching from high to low (or low to high) is ~1.5 seconds. To visually see that everything is working properly you can connect an LED to each of the output pins. Make sure that there is a current limiting resistor in series with the LED. You should draw no more than 25 ma from any of the I/O pins. If you are using the PIC16F873 MicroBoard, the RA4 pin will not switch unless an external pull-up resistor is connected (see section 6.1.1) Using I/O with debug87x.hex Setting the data direction is accomplished using the input and output commands. >> output b4 - configures pin RB4 as an output >> input c2 - configures pin RC2 as an input To set the value of an output pin use the set and clear commands.

26 >> set b4 - sets output pin RB4 high (+5V) >> clear b4 - sets output pin RB4 low (0V) To read the value on one of the inputs use the read command. >> read c2 Pin=1 The value is displayed in the terminal window as shown above. Here it is assumed that the input pin RC2 is high. If you connect an LED to one of the I/O pins, say pin RC0, you can turn it on and off using the above commands. Remember to include a current limiting resistor. >> output c0 - configures pin RC0 as an output >> set c0 - turns on LED >> clear c0 - turns off LED If you have hardware flow control enabled (see section 5.1) you can use a script to perform the same task. Simply save the following commands to a text file (do not include the comments on the right). output c0 set c0 delay 96 clear c0 delay 96 set c0 delay 96 clear c0 delay 96 set c0 etc. - configures pin RC0 as an output - blank line is ignored - turn on LED - wait 1.5 sec. (see below) - turn off LED - wait - turn on LED again - wait - turn off LED again - wait - repeat ad nauseum In HyperTerminal select the Transfer>Send Text File command and choose your text file. The LED should be blinking now and will stop when the commands in your script are finished executing. The delay command accepts a two digit hexadecimal number (hh) and will wait (hh x 10)ms before executing the next command. It is not terribly useful when you are connected to the MicroBoard through HyperTerminal since you, as the operator, can wait as long as you like between sending commands. The delay command is, as illustrated above, useful when sending a script of commands to the MicroBoard. >> delay 10 - waits 10 x 10ms = 160ms >> delay 8f - waits 8F x 10ms = 1430ms >> delay ff - waits FF x 10ms = 2550ms

27 6.2 Parallel Slave Port (PSP) PIC16F877 Only The Parallel Save Port (PSP) allows you to transmit or receive data in byte size chunks, rather than bit by bit as in serial communications. The PSP runs in slave mode, meaning the peripheral device it is connected to controls when data is read from or written to it. This is accomplished using the RD, WR and CS control inputs. Setting the PSPMODE bit (TRISE<4>) enables the PSP module. The pins RE0/RD, RE1/WR and RE2/CS function as control inputs for this module thus the data direction bits TRISE<2:0> must be set. These pins must also be configured for digital I/O by appropriately setting the A/D port configuration control bits (ADCON1<3:0>). Refer to Section 11.0 (Register 11-2) in the PIC16F87X data sheet for a table of the A/D port configuration control bits. For example, writing 0010 to ADCON1<3:0> configures the port E pins for digital I/O. Note: In this configuration the port A pins are configured as analog inputs. Port D functions as the data lines and is actually two separate registers; one that holds received data and one that holds data to be transmitted. Thus the data direction bits in the TRISD register are ignored and need not be initialized. To signal a write operation to the PSP both the WR and CS lines are set low. When either the WR or CS lines returns high the Input Buffer Full (IBF) flag bit (TRISE<7>) is set signaling that the write is complete. It is cleared when PORTD is read. The interrupt flag bit PSPIF (PIR1<7>) is also set when the write is complete. If a second write to the PSP is attempted before PORTD is read the Input Buffer Overflow (IBOV) status flag (TRISE<5>) is set. PSPIF and IBOV must be cleared manually. To signal a read operation from the PSP both the RD and CS lines are set low. The Output Buffer Full (OBF) flag bit (TRISE<6>) is cleared immediately after the read operation is initiated. It is set when data is written to PORTD. The interrupt flag bit PSPIF (PIR1<7>) is set when either the RD or CS lines returns high indicating that the read is complete. To disable interrupts the interrupt enable bit PSPIE (PIE1<7>) must be cleared. Table 6.5: Summary of Registers Associated with the PSP module. Name Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PORTD 0x08 RD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 PORTE 0x05 RE2 RE1 RE0 TRISE 0x85 IBF OBF IBOV PSPMODE PORTE data direction bits. PIR1 0x0C PSPIF ADIF RCIF TXIF SSPIF CCP1IF TMR2IF TMR1IF PIE1 0x8C PSPIE ADIE RCIE TXIE SSPIE CCP1IE TMR2IE TMR1IE ADCON1 0x9F ADFM PCFG3 PCFG2 PCFG1 PCFG0 For additional information on using the PSP module see section 3.6 in the PIC16F87X data sheet Using The Parallel Slave Port Example The source code to accompany this example (testpsp.asm) can be found in the PIC Code section of the EE401 website. In this example data will be input via the PSP and will be displayed on selected output pins. The mapping from inputs to outputs is as follows: INPUTS RD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 OUTPUTS RA5 RA4 RA3 RA2 RA1 RA0 RB0 RB3 Connecting a LED to each of these outputs will allow you to visually see the value on each of the pins. The peripheral device controlling the PSP will be you. Consider the following schematic:

28 +5V PIC16F877 RD7 RD6 RD5 RD4 RD3 RD2 RD1 RD0 RD V WR CS 9 10 Pushbutton S7 S6 S5 S4 S3 S2 S1 S0 Figure 6.1: Schematic Parallel Slave Port Example Using this setup you can manually toggle the value of each of the inputs. For example, when switch 1 (S1) is open pin RD1 will be held high. Closing switch 1 sets pin RD1 low. You can also manually control the WR control input. Normally the WR input is held high but when the pushbutton is depressed it will be set low. The CS input is permanently held low (i.e. the PSP is always activated) and since the RD control input is not used it is held high. The procedure is very simple. 1. Set the desired input value using the switches. 2. Press the pushbutton. and Voila! You should now see the input value displayed on the outputs. Let s analyze the source code. The program begins by initializing the PSP module (initializepsp subroutine). The next subroutine (initializeoutputs) configures the pins RA5-RA0, RB3 and RB0 as digital I/O outputs and initializes their values to zero. Data is input in the readpsp subroutine. When the IBF flag bit is set (pushbutton is pressed and released) the data on the PORTD input pins is read in and stored in a memory location labeled DATAREG. The displaydata subroutine simply transfers the data from the DATAREG memory location to the appropriate output pins.

29 6.3 Timer Modules Built into the PIC are three timer modules. Timer 0 is a general-purpose 8-bit timer/counter. Timer 1 is a 16-bit timer/counter that can be used with the capture/compare/pwm module. Finally, timer 2 is an 8-bit timer that is used to control the PWM module. Refer to sections 5-7 in the PIC16F87X data sheet for detailed instructions on using the respective timer modules. 6.4 Master Synchronous Serial Port (MSSP) The Master Synchronous Serial Port (MSSP) module is used for serial communication with peripheral devices. The MSSP module can operate in one of two modes: 1. Serial Peripheral Interface (SPI) 2. Inter-Integrated Circuit (I 2 C) Only the SPI module will be discussed in this manual. For instructions on using the I 2 C module refer to section 9.2 of the PIC16F87X data sheet Serial Peripheral Interface (SPI) Instructions on using the SPI module will not be provided in this manual since clear and detailed instructions are provided in section 9.1 of the PIC16F87X data sheet. Instead a detailed example using the SPI module will be presented here Adding Additional Outputs Using Shift Registers and SPI The source code to accompany this example (addouts.asm) can be found in the PIC Code section of the EE401 website. Before continuing familiarize yourself with the operation of the 74HC595 shift register. Using the SPI and some external shift registers you can increase the number of digital outputs. Consider the following schematic: RA3 5 PIC16F SCK 11 +5V 12 16,10 8, ,10 +5V 8, ,10 +5V 8, ,10 +5V 8,13 24 SDO HC595 74HC595 74HC595 74HC Figure 6.2: Schematic Adding Additional Outputs Using Shift Registers The output pin of the SPI (SDO) is fed into a bank of 74HC595 shift registers connected in series. The outputs of the shift registers will be used as additional output pins. In this case we have 8x4=32 additional output pins. Data is shifted into the bank of shift registers one byte at a time. A byte of data output from the SPI will be shifted into shift register A. The contents of shift register A will be shifted into shift register B, and so on. Every time you want to change the value on the output pins all four shift registers must be updated, thus four bytes of data are shifted in from the SPI. You are limited in the number of additional outputs only by the time delay in updating the shift registers. It is possible, say, to connect 500 shift registers in series to create an additional 500x8=4000 outputs. However, to change the value on just one pin you would have to update all 500 shift registers.

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI SPI Overview and Use of the PICmicro Serial Peripheral Interface In this presentation, we will look at what the Serial Peripheral Interface, otherwise known as the SPI, is, and how it is used to communicate

More information

An Introduction to MPLAB Integrated Development Environment

An Introduction to MPLAB Integrated Development Environment An Introduction to MPLAB Integrated Development Environment 2004 Microchip Technology Incorporated An introduction to MPLAB Integrated Development Environment Slide 1 This seminar is an introduction to

More information

PIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm)

PIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm) PIC Programming in Assembly (http://www.mstracey.btinternet.co.uk/index.htm) Tutorial 1 Good Programming Techniques. Before we get to the nitty gritty of programming the PIC, I think now is a good time

More information

I 2 C Master Mode Overview and Use of the PICmicro MSSP I 2 C Interface with a 24xx01x EEPROM

I 2 C Master Mode Overview and Use of the PICmicro MSSP I 2 C Interface with a 24xx01x EEPROM I 2 C Master Mode Overview and Use of the PICmicro MSSP I 2 C Interface with a 24xx01x EEPROM v 0.40 Welcome to the Microchip Technology Presentation on using the MSSP module in Master I 2 C mode. In this

More information

Analog-to-Digital Converters

Analog-to-Digital Converters Analog-to-Digital Converters In this presentation we will look at the Analog-to-Digital Converter Peripherals with Microchip s midrange PICmicro Microcontrollers series. 1 Analog-to-Digital Converters

More information

Section 28. In-Circuit Serial Programming (ICSP )

Section 28. In-Circuit Serial Programming (ICSP ) M Section 28. In-Circuit Serial Programming (ICSP ) HIGHLIGHTS This section of the manual contains the following major topics: 28. Introduction...28-2 28.2 Entering In-Circuit Serial Programming Mode...28-3

More information

Section 8. Interrupts

Section 8. Interrupts Interrupts M Section 8. Interrupts HIGHLIGHTS This section of the manual contains the following major topics: 8.1 Introduction...8-2 8.2 Control Registers...8-5 8.3 Interrupt Latency...8-10 8.4 INT and

More information

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II Administration: o Prayer PicBasic Pro Programs Used in This Lesson: o General PicBasic Pro Program

More information

Microcontroller Code Example Explanation and Words of Wisdom For Senior Design

Microcontroller Code Example Explanation and Words of Wisdom For Senior Design Microcontroller Code Example Explanation and Words of Wisdom For Senior Design For use with the following equipment: PIC16F877 QikStart Development Board ICD2 Debugger MPLAB Environment examplemain.c and

More information

Using The PIC I/O Ports

Using The PIC I/O Ports EE2801 -- Lecture 22 Using The PIC I/O Ports EE2801-L22P01 The Variety Of Available IO Ports The PIC 16F874 microcontroller has five different IO ports, accounting for thirty three of the processors forty

More information

2.0 Command and Data Handling Subsystem

2.0 Command and Data Handling Subsystem 2.0 Command and Data Handling Subsystem The Command and Data Handling Subsystem is the brain of the whole autonomous CubeSat. The C&DH system consists of an Onboard Computer, OBC, which controls the operation

More information

Section 9. I/O Ports

Section 9. I/O Ports I/O Ports M Section 9. I/O Ports HIGHLIGHTS This section of the manual contains the following major topics: 9.1 Introduction...9-2 9.2 PORTA and the TRISA Register...9-4 9.3 PORTB and the TRISB Register...9-6

More information

How To Program A Microcontroller With Memory On A Microchip Microcontroller

How To Program A Microcontroller With Memory On A Microchip Microcontroller Getting Started with On-chip Memory 2001 Microchip Technology Incorporated. All Rights Reserved. S0001A RAM/ROM(x14) 1 In this Getting Started tutorial you will learn about the various memory types found

More information

ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation

ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation Program Definition: Write a program to control the speed of a dc motor using pulse width modulation. Discussion: The speed of a dc motor is

More information

Tutorial for MPLAB Starter Kit for PIC18F

Tutorial for MPLAB Starter Kit for PIC18F Tutorial for MPLAB Starter Kit for PIC18F 2006 Microchip Technology Incorporated. All Rights Reserved. WebSeminar Title Slide 1 Welcome to the tutorial for the MPLAB Starter Kit for PIC18F. My name is

More information

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan PIC18 Timer Programming g Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan chanhl@mail.cgu.edu.twcgu Functions of PIC18 timer Functions of the timer Generate a time delay As

More information

PICmicro tm Development Board

PICmicro tm Development Board PICmicro tm Development Board Crownhill Associates smart electronic solutions Disclaimer In order to comply with EMC directive 89/336/EEC, this product should not be used outside of a classroom or laboratory

More information

Section 14. Compare/Capture/PWM (CCP)

Section 14. Compare/Capture/PWM (CCP) M Section 14. Compare/Capture/PWM (CCP) HIGHLIGHTS This section of the manual contains the following major topics: 14.1 Introduction...14-2 14.2 Control Register...14-3 14.3 Capture Mode...14-4 14.4 Compare

More information

ET-BASE AVR ATmega64/128

ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 which is a Board Microcontroller AVR family from ATMEL uses MCU No.ATmega64 and ATmega128 64PIN. Board ET-BASE AVR ATmega64/128 uses MCU s resources on

More information

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide Sensors LCD Real Time Clock/ Calendar DC Motors Buzzer LED dimming Relay control I2C-FLEXEL PS2 Keyboards Servo Motors IR Remote Control

More information

8051 MICROCONTROLLER COURSE

8051 MICROCONTROLLER COURSE 8051 MICROCONTROLLER COURSE Objective: 1. Familiarization with different types of Microcontroller 2. To know 8051 microcontroller in detail 3. Programming and Interfacing 8051 microcontroller Prerequisites:

More information

Serial Communications

Serial Communications Serial Communications 1 Serial Communication Introduction Serial communication buses Asynchronous and synchronous communication UART block diagram UART clock requirements Programming the UARTs Operation

More information

CHAPTER 11: Flip Flops

CHAPTER 11: Flip Flops CHAPTER 11: Flip Flops In this chapter, you will be building the part of the circuit that controls the command sequencing. The required circuit must operate the counter and the memory chip. When the teach

More information

c0003 A Simple PIC Application CHAPTER 3

c0003 A Simple PIC Application CHAPTER 3 c0003 CHAPTER 3 A Simple PIC Application Chapter Outline 3.1. Hardware Design 46 3.1.1. PIC 16F84A Pin-Out 46 3.1.2. BIN Hardware Block Diagram 47 3.1.3. BIN Circuit Operation 48 3.2. Program Execution

More information

Lab Experiment 1: The LPC 2148 Education Board

Lab Experiment 1: The LPC 2148 Education Board Lab Experiment 1: The LPC 2148 Education Board 1 Introduction The aim of this course ECE 425L is to help you understand and utilize the functionalities of ARM7TDMI LPC2148 microcontroller. To do that,

More information

Section 21. 8-bit A/D Converter

Section 21. 8-bit A/D Converter M Section 21. Converter HIGHLIGHTS 21 Convertor This section of the manual contains the following major topics: 21.1 Introduction...21-2 21.2 Control Registers...21-3 21.3 Operation...21-5 21.4 A/D Acquisition

More information

Using Xbee 802.15.4 in Serial Communication

Using Xbee 802.15.4 in Serial Communication Using Xbee 802.15.4 in Serial Communication Jason Grimes April 2, 2010 Abstract Instances where wireless serial communication is required to connect devices, Xbee RF modules are effective in linking Universal

More information

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Fondamenti su strumenti di sviluppo per microcontrollori PIC Fondamenti su strumenti di sviluppo per microcontrollori PIC MPSIM ICE 2000 ICD 2 REAL ICE PICSTART Ad uso interno del corso Elettronica e Telecomunicazioni 1 2 MPLAB SIM /1 MPLAB SIM is a discrete-event

More information

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc. SKP16C62P Tutorial 1 Software Development Process using HEW Renesas Technology America Inc. 1 Overview The following tutorial is a brief introduction on how to develop and debug programs using HEW (Highperformance

More information

Chapter 13. PIC Family Microcontroller

Chapter 13. PIC Family Microcontroller Chapter 13 PIC Family Microcontroller Lesson 01 PIC Characteristics and Examples PIC microcontroller characteristics Power-on reset Brown out reset Simplified instruction set High speed execution Up to

More information

Measuring Resistance Using Digital I/O

Measuring Resistance Using Digital I/O Measuring Resistance Using Digital I/O Using a Microcontroller for Measuring Resistance Without using an ADC. Copyright 2011 John Main http://www.best-microcontroller-projects.com Page 1 of 10 Table of

More information

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR INTRODUCTION This Project "Automatic Night Lamp with Morning Alarm" was developed using Microprocessor. It is the Heart of the system. The sensors

More information

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3 MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3 CMPS03 Magnetic Compass. Voltage : 5v only required Current : 20mA Typ. Resolution : 0.1 Degree Accuracy : 3-4 degrees approx. after calibration Output

More information

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

M68EVB908QL4 Development Board for Motorola MC68HC908QL4 M68EVB908QL4 Development Board for Motorola MC68HC908QL4! Axiom Manufacturing 2813 Industrial Lane Garland, TX 75041 Email: Sales@axman.com Web: http://www.axman.com! CONTENTS CAUTIONARY NOTES...3 TERMINOLOGY...3

More information

Designing VM2 Application Boards

Designing VM2 Application Boards Designing VM2 Application Boards This document lists some things to consider when designing a custom application board for the VM2 embedded controller. It is intended to complement the VM2 Datasheet. A

More information

Evo Laser Firmware Developer s Manual

Evo Laser Firmware Developer s Manual Evo Laser Firmware Developer s Manual Table of Content Chapter 1 Introduction Chapter 2 Hardware Overview and Subsystems 2.1 Overview 2.2 Evo Laser Hardware Core System 2.3 Evo Laser Smartport TM Chapter

More information

The Programming Interface

The Programming Interface : In-System Programming Features Program any AVR MCU In-System Reprogram both data Flash and parameter EEPROM memories Eliminate sockets Simple -wire SPI programming interface Introduction In-System programming

More information

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB Contents at a Glance 1. Introduction of MPLAB... 4 2. Development Tools... 5 3. Getting Started... 6 3.1. Create a Project... 8 3.2. Start MPLAB...

More information

Ocean Controls RC Servo Motor Controller

Ocean Controls RC Servo Motor Controller Ocean Controls RC Servo Motor Controller RC Servo Motors: RC Servo motors are used in radio-controlled model cars and planes, robotics, special effects, test equipment and industrial automation. At the

More information

Advanced Data Capture and Control Systems

Advanced Data Capture and Control Systems Advanced Data Capture and Control Systems Tronisoft Limited Email: sales@tronisoft.com Web: www.tronisoft.com RS232 To 3.3V TTL User Guide RS232 to 3.3V TTL Signal Converter Modules P/N: 9651 Document

More information

Serial Communications

Serial Communications April 2014 7 Serial Communications Objectives - To be familiar with the USART (RS-232) protocol. - To be able to transfer data from PIC-PC, PC-PIC and PIC-PIC. - To test serial communications with virtual

More information

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual Copyright 2007 SofTec Microsystems DC01197 We want your feedback! SofTec Microsystems is always on

More information

PIC in Practice. A Project-Based Approach. D. W. Smith

PIC in Practice. A Project-Based Approach. D. W. Smith PIC in Practice PIC in Practice A Project-Based Approach D. W. Smith AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO Newnes is an imprint of Elsevier

More information

Freescale Semiconductor, I

Freescale Semiconductor, I nc. Application Note 6/2002 8-Bit Software Development Kit By Jiri Ryba Introduction 8-Bit SDK Overview This application note describes the features and advantages of the 8-bit SDK (software development

More information

DS1621 Digital Thermometer and Thermostat

DS1621 Digital Thermometer and Thermostat Digital Thermometer and Thermostat www.dalsemi.com FEATURES Temperature measurements require no external components Measures temperatures from 55 C to +125 C in 0.5 C increments. Fahrenheit equivalent

More information

How to design and implement firmware for embedded systems

How to design and implement firmware for embedded systems How to design and implement firmware for embedded systems Last changes: 17.06.2010 Author: Rico Möckel The very beginning: What should I avoid when implementing firmware for embedded systems? Writing code

More information

Using a Laptop Computer with a USB or Serial Port Adapter to Communicate With the Eagle System

Using a Laptop Computer with a USB or Serial Port Adapter to Communicate With the Eagle System Using a Laptop Computer with a USB or Serial Port Adapter to Communicate With the Eagle System ECU DB9 USB 20-060_A.DOC Page 1 of 18 9/15/2009 2009 Precision Airmotive LLC This publication may not be copied

More information

- 35mA Standby, 60-100mA Speaking. - 30 pre-defined phrases with up to 1925 total characters.

- 35mA Standby, 60-100mA Speaking. - 30 pre-defined phrases with up to 1925 total characters. Contents: 1) SPE030 speech synthesizer module 2) Programming adapter kit (pcb, 2 connectors, battery clip) Also required (for programming) : 4.5V battery pack AXE026 PICAXE download cable Specification:

More information

Section 23. 10-bit A/D Converter

Section 23. 10-bit A/D Converter M Section 23. A/D Converter HIGHLIGHTS This section of the manual contains the following major topics: 23.1 Introduction...23-2 23.2 Control Register...23-3 23.3 Operation...23-5 23.4 A/D Acquisition Requirements...23-6

More information

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV UNIT I THE 8086 MICROPROCESSOR 1. What is the purpose of segment registers

More information

EasyPIC4 User s Manual

EasyPIC4 User s Manual SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD MikroElektronika - Books - Compilers User s Manual PIC MICROCHIP DEVELOPMENT BOARD 3in1 mikro IN-CIRCUIT DEBUGGER USB 2.0 IN-CIRCUIT PROGRAMMER With

More information

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V1.0. 20 th November 2012. L6470 Stepper Motor Shield

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V1.0. 20 th November 2012. L6470 Stepper Motor Shield Arduino Dual L6470 Stepper Motor Shield Data Sheet Adaptive Design ltd V1.0 20 th November 2012 Adaptive Design ltd. Page 1 General Description The Arduino stepper motor shield is based on L6470 microstepping

More information

DS1104 R&D Controller Board

DS1104 R&D Controller Board DS1104 R&D Controller Board Cost-effective system for controller development Highlights Single-board system with real-time hardware and comprehensive I/O Cost-effective PCI hardware for use in PCs Application

More information

Section 29. Instruction Set

Section 29. Instruction Set M Section 29. Instruction Set HIGHLIGHTS This section of the manual contains the following major topics: 29. Introduction...29-2 29.2 Instruction Formats...29-4 29.3 Special Function Registers as Source/Destination...29-6

More information

Antenna Rotator System

Antenna Rotator System Antenna Rotator System RCI-USB Reference Manual September/2011 Rev 1.3c Introduction Thank you for purchasing the ARS RCI-USB Interface. Presently, the ARS System provides the most powerful highest performance

More information

DS1621 Digital Thermometer and Thermostat

DS1621 Digital Thermometer and Thermostat www.maxim-ic.com FEATURES Temperature measurements require no external components Measures temperatures from -55 C to +125 C in 0.5 C increments. Fahrenheit equivalent is -67 F to 257 F in 0.9 F increments

More information

How to setup a serial Bluetooth adapter Master Guide

How to setup a serial Bluetooth adapter Master Guide How to setup a serial Bluetooth adapter Master Guide Nordfield.com Our serial Bluetooth adapters part UCBT232B and UCBT232EXA can be setup and paired using a Bluetooth management software called BlueSoleil

More information

AVR Butterfly Training. Atmel Norway, AVR Applications Group

AVR Butterfly Training. Atmel Norway, AVR Applications Group AVR Butterfly Training Atmel Norway, AVR Applications Group 1 Table of Contents INTRODUCTION...3 GETTING STARTED...4 REQUIRED SOFTWARE AND HARDWARE...4 SETTING UP THE HARDWARE...4 SETTING UP THE SOFTWARE...5

More information

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE Atmel AVR 8-bit Microcontroller AVR151: Setup and Use of the SPI APPLICATION NOTE Introduction This application note describes how to set up and use the on-chip Serial Peripheral Interface (SPI) of the

More information

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) ( dspic / PIC24 Multiprogrammer datasheet EB064-00 00-1 Contents 1. About this document... 2 2. General information... 3 3. Board layout... 4 4. Testing this product... 5 5. Circuit description... 6 Appendix

More information

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR AND MICROCOMPUTER BASICS Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Introduction to Microcontrollers Motorola M68HC11 Specs Assembly Programming Language BUFFALO Topics of Discussion Microcontrollers M68HC11 Package & Pinouts Accumulators Index Registers Special Registers

More information

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A Application Note Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A AN026701-0308 Abstract This application note demonstrates a method of implementing the Serial Peripheral Interface

More information

RS-485 Protocol Manual

RS-485 Protocol Manual RS-485 Protocol Manual Revision: 1.0 January 11, 2000 RS-485 Protocol Guidelines and Description Page i Table of Contents 1.0 COMMUNICATIONS BUS OVERVIEW... 1 2.0 DESIGN GUIDELINES... 1 2.1 Hardware Design

More information

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs AN033101-0412 Abstract This describes how to interface the Dallas 1-Wire bus with Zilog s Z8F1680 Series of MCUs as master devices. The Z8F0880,

More information

User Guide Reflow Toaster Oven Controller

User Guide Reflow Toaster Oven Controller User Guide Reflow Toaster Oven Controller Version 1.5-01/10/12 DROTEK Web shop: www.drotek.fr SOMMAIRE 1. Introduction... 3 2. Preparation of THE REFLOW CONTROLLER... 4 2.1. Power supply... 4 2.2. USB

More information

Accurate Measurement of the Mains Electricity Frequency

Accurate Measurement of the Mains Electricity Frequency Accurate Measurement of the Mains Electricity Frequency Dogan Ibrahim Near East University, Faculty of Engineering, Lefkosa, TRNC dogan@neu.edu.tr Abstract The frequency of the mains electricity supply

More information

K8048 PIC PROGRAMMER BOARD

K8048 PIC PROGRAMMER BOARD K8048 PIC PROGRAMMER BOARD Velleman Kits Welcome to the exciting world of Velleman Kits. Velleman Kit is known all over the world for our High Quality electronic kits. Our range goes from easy to build

More information

Microcontrollers in Practice

Microcontrollers in Practice M. Mitescu I. Susnea Microcontrollers in Practice With 117 Figures, 34 Tables and CD-Rom 4y Springer Contents Resources of Microcontrollers, 1 1.1 In this Chapter 1 1.2 Microcontroller Architectures 1

More information

Electric Landing Gear controllers and sequencer LGC12 / LGC 13C

Electric Landing Gear controllers and sequencer LGC12 / LGC 13C Electric Landing Gear controllers and sequencer LGC12 / LGC 13C Users Guide. Torrent d en Puig, 31. 08358, Arenys de Munt, Barcelona,Catalonia,Spain E-mail: info@xicoy.com. Fax: +34 933 969 743 web: www.xicoy.com

More information

INTERRUPTS. There are 2 methods for communicating between the microcontroller and the external system: POLLING INTERRUPTS

INTERRUPTS. There are 2 methods for communicating between the microcontroller and the external system: POLLING INTERRUPTS INTERRUPTS There are 2 methods for communicating between the microcontroller and the external system: POLLING INTERRUPTS POLLING In this method, microcontroller accesses at the exact time interval the

More information

RS232 Board datasheet

RS232 Board datasheet RS232 Board datasheet Contents 1. About this document 2. General information 3. Board Layout 4. Getting Started 5. Circuit Description Appendix 1 Circuit Diagram Copyright 2004 Matrix Multimedia Limited

More information

Traditional IBM Mainframe Operating Principles

Traditional IBM Mainframe Operating Principles C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain

More information

Troubleshooting and Diagnostics

Troubleshooting and Diagnostics Troubleshooting and Diagnostics The troubleshooting and diagnostics guide provides instructions to assist in tracking down the source of many basic controller installation problems. If there is a problem

More information

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction Software ISO 7816 I/O Line Implementation Features ISO 7816-3 compliant (direct convention) Byte reception and transmission with parity check Retransmission on error detection Automatic reception at the

More information

PolyBot Board. User's Guide V1.11 9/20/08

PolyBot Board. User's Guide V1.11 9/20/08 PolyBot Board User's Guide V1.11 9/20/08 PolyBot Board v1.1 16 pin LCD connector 4-pin SPI port (can be used as digital I/O) 10 Analog inputs +5V GND GND JP_PWR 3-pin logic power jumper (short top 2 pins

More information

CENTRONICS interface and Parallel Printer Port LPT

CENTRONICS interface and Parallel Printer Port LPT Course on BASCOM 8051 - (37) Theoretic/Practical course on BASCOM 8051 Programming. Author: DAMINO Salvatore. CENTRONICS interface and Parallel Printer Port LPT The Parallel Port, well known as LPT from

More information

MACHINE ARCHITECTURE & LANGUAGE

MACHINE ARCHITECTURE & LANGUAGE in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based

More information

KTA-223 Arduino Compatible Relay Controller

KTA-223 Arduino Compatible Relay Controller 8 Relay Outputs 5A 250VAC 4 Opto-Isolated Inputs 5-30VDC 3 Analog Inputs (10 bit) Connections via Pluggable Screw Terminals 0-5V or 0-20mA Analog Inputs, Jumper Selectable 5A Relay Switching Power Indicator

More information

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual. 14.10.2010 HAW - Arduino 1

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual. 14.10.2010 HAW - Arduino 1 The I2C Bus Introduction The I2C-bus is a de facto world standard that is now implemented in over 1000 different ICs manufactured by more than 50 companies. Additionally, the versatile I2C-bus is used

More information

Small Hardware Development and Prototyping Board for the SX28

Small Hardware Development and Prototyping Board for the SX28 Project Report: Small Hardware Development and Prototyping Board for the SX28 Project Number: PR57 1. Project Description 2. Schematic Diagram 3. Physical Diagram 4. Component Layout Diagram 5. Bill of

More information

Microcomputer Based Electronics: Using the C Stamp in Pre- Engineering, Technology, and Engineering Programs

Microcomputer Based Electronics: Using the C Stamp in Pre- Engineering, Technology, and Engineering Programs 28 29 April 2007, Ewing Township, New Jersey. Microcomputer Based Electronics: Using the C Stamp in Pre- Engineering, Technology, and Engineering Programs Orlando J. Hernandez The College of New Jersey,

More information

Bidirectional wireless communication using EmbedRF

Bidirectional wireless communication using EmbedRF Bidirectional wireless communication using EmbedRF 1. Tools you will need for this application note... 2 2. Introduction... 3 3. Connect EmbedRF Board to USB Interface Board... 3 4. Install and Run EmbedRF

More information

POCKET SCOPE 2. The idea 2. Design criteria 3

POCKET SCOPE 2. The idea 2. Design criteria 3 POCKET SCOPE 2 The idea 2 Design criteria 3 Microcontroller requirements 3 The microcontroller must have speed. 3 The microcontroller must have RAM. 3 The microcontroller must have secure Flash. 3 The

More information

PART B QUESTIONS AND ANSWERS UNIT I

PART B QUESTIONS AND ANSWERS UNIT I PART B QUESTIONS AND ANSWERS UNIT I 1. Explain the architecture of 8085 microprocessor? Logic pin out of 8085 microprocessor Address bus: unidirectional bus, used as high order bus Data bus: bi-directional

More information

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT HARDWARE GUIDE This document is part of Turbo Programmer documentation. For Developer Documentation, Applications and Examples, see http:/// PRELIMINARY (C)

More information

Controlling a Dot Matrix LED Display with a Microcontroller

Controlling a Dot Matrix LED Display with a Microcontroller Controlling a Dot Matrix LED Display with a Microcontroller By Matt Stabile and programming will be explained in general terms as well to allow for adaptation to any comparable microcontroller or LED matrix.

More information

RC2200DK Demonstration Kit User Manual

RC2200DK Demonstration Kit User Manual Demonstration Kit User Manual Table of contents TABLE OF CONTENTS... 1 QUICK INTRODUCTION... 2 INTRODUCTION... 3 DEMONSTRATION BOARD... 4 POWER SUPPLY SECTION... 5 RS-232 INTERFACE... 6 CONNECTORS... 7

More information

Palaparthi.Jagadeesh Chand. Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P.

Palaparthi.Jagadeesh Chand. Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P. Patient Monitoring Using Embedded Palaparthi.Jagadeesh Chand Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P Abstract The aim of this project is to inform

More information

Electronic Rotary Table Divider V2.1 Construction

Electronic Rotary Table Divider V2.1 Construction Electronic Rotary Table Divider V2.1 Construction 2006,2013 Steve Ward (steve@worldofward.com) Legal: All documents, code, schematics, firmware etc are offered as an aid to the experienced constructor

More information

DKWF121 WF121-A 802.11 B/G/N MODULE EVALUATION BOARD

DKWF121 WF121-A 802.11 B/G/N MODULE EVALUATION BOARD DKWF121 WF121-A 802.11 B/G/N MODULE EVALUATION BOARD PRELIMINARY DATA SHEET Wednesday, 16 May 2012 Version 0.5 Copyright 2000-2012 Bluegiga Technologies All rights reserved. Bluegiga Technologies assumes

More information

Lab 1: Introduction to Xilinx ISE Tutorial

Lab 1: Introduction to Xilinx ISE Tutorial Lab 1: Introduction to Xilinx ISE Tutorial This tutorial will introduce the reader to the Xilinx ISE software. Stepby-step instructions will be given to guide the reader through generating a project, creating

More information

MANUAL FOR RX700 LR and NR

MANUAL FOR RX700 LR and NR MANUAL FOR RX700 LR and NR 2013, November 11 Revision/ updates Date, updates, and person Revision 1.2 03-12-2013, By Patrick M Affected pages, ETC ALL Content Revision/ updates... 1 Preface... 2 Technical

More information

User Manual. AS-Interface Programmer

User Manual. AS-Interface Programmer AS-Interface Programmer Notice: RESTRICTIONS THE ZMD AS-INTERFACE PROGRAMMER HARDWARE AND ZMD AS-INTERFACE PROGRAMMER SOFTWARE IS DESIGNED FOR IC EVALUATION, LABORATORY SETUP AND MODULE DEVELOPMENT ONLY.

More information

FLYPORT Wi-Fi 802.11G

FLYPORT Wi-Fi 802.11G FLYPORT Wi-Fi 802.11G System on module 802.11g WIFI - Infrastructure mode - softap mode - Ad hoc mode Microchip PIC 24F 16 bit processor Microchip MRF24WG0MA/MB - Native WiFi 802.11g transceiver - PCB

More information

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs) Embedded Systems on ARM Cortex-M3 (4weeks/45hrs) Course & Kit Contents LEARN HOW TO: Use of Keil Real View for ARM Use ARM Cortex-M3 MCU for professional embedded application development Understanding

More information

Massachusetts Institute of Technology

Massachusetts Institute of Technology Objectives Massachusetts Institute of Technology Robotics: Science and Systems I Lab 1: System Overview and Introduction to the µorcboard Distributed: February 4, 2015, 3:30pm Checkoffs due: February 9,

More information

Real-Time Clock. * Real-Time Computing, edited by Duncan A. Mellichamp, Van Nostrand Reinhold

Real-Time Clock. * Real-Time Computing, edited by Duncan A. Mellichamp, Van Nostrand Reinhold REAL-TIME CLOCK Real-Time Clock The device is not a clock! It does not tell time! It has nothing to do with actual or real-time! The Real-Time Clock is no more than an interval timer connected to the computer

More information

PIC16F87X. 28/40-pin 8-Bit CMOS FLASH Microcontrollers. Devices Included in this Data Sheet: Pin Diagram PDIP. Microcontroller Core Features:

PIC16F87X. 28/40-pin 8-Bit CMOS FLASH Microcontrollers. Devices Included in this Data Sheet: Pin Diagram PDIP. Microcontroller Core Features: 28/40-pin 8-Bit CMOS FLASH Microcontrollers Devices Included in this Data Sheet: PIC16F873 PIC16F874 PIC16F876 PIC16F877 Microcontroller Core Features: High-performance RISC CPU Only 35 single word instructions

More information

Embedded C Programming

Embedded C Programming Microprocessors and Microcontrollers Embedded C Programming EE3954 by Maarten Uijt de Haag, Tim Bambeck EmbeddedC.1 References MPLAB XC8 C Compiler User s Guide EmbeddedC.2 Assembly versus C C Code High-level

More information