APP-II PIC Development Kit by AWC

Similar documents
APP-IIb PIC Development Kit by AWC

GP1 LCD RS232 Terminal Kit 2003 by AWC

APP-IV ATmega Development Kit 2004 by AWC

Rapid40iXL PIC Prototyping PCB User Manual

CMS-8GP32. A Motorola MC68HC908GP32 Microcontroller Board. xiom anufacturing

04/12/11 version 1.0

Rapid28iXL PIC Prototyping PCB User Manual

PIC 28 Pin Board Documentation. Update Version 5.0

CLCD1 Serial 1 wire RS232 LCD development board

Bolt 18F2550 System Hardware Manual

MegaAVR-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

RS-232 Driver Module

Supplement for module D041 incl. ATMega8 Prozessor

PSIM Tutorial. How to Use SCI for Real-Time Monitoring in F2833x Target. February Powersim Inc.

Assembly Instructions for 128x64 Graphics Display Unit

Rapid40i PIC Prototyping PCB User Manual

32 bit Micro Experimenter Board Description and Assembly manual

PAK-VIa PS/2 Coprocessor Data Sheet by AWC

AXE Stack 18. BASIC-Programmable Microcontroller Kit. An inexpensive introduction to microcontroller technology for all ability levels

CEIBO FE-51RD2 Development System

CEIBO FE-5111 Development System

LocoBuffer Documentation 08/07/2003

Supplement for module D061 incl. ATMega128 Prozessor

BASIC Stamp 1 Project Board (#27112) Development / Education Platform for the BASIC Stamp 1

K191 3 Channel RGB LED Controller

8051 Intermidiate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

AVR-M Rev 5 ASSEMBLY

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd.

PAK-XI PS/2 Coprocessor Data Sheet by AWC

TDSDB Features. Description

Datasheet for PAS12 Serial Adaptor rev 1.50

Dwarf Boards. DB057 : 40-pin controller board

EPM900 - Overview. Features. Technical Data

USB232 board EB Technical datasheet

DIY KIT 123. ATMEL 89xxxx PROGRAMMER

VINCULUM-BASED TEMPERATURE / HUMIDITY / VOLTAGE DATA LOGGER FEATURES:

CEIBO FE-W7 Development System

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Building RoboPIC 18F4550

VM134 (K8076) QUICK GUIDE

MCP2120/MCP2150 DEVELOPER S KIT USER S GUIDE

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580

USB485 USB to RS485 Converter Card

8051 Basic Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

Basic Input/Output Operations

Introducing the 32 bit Micro Experimenter

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

KPIC-0818P (V050919) Devices Included in this Data sheet: KPIC-0818P

OpenSprinkler v2.2u Build Instructions

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

PIC Microcontroller Introduction

Device: PLT This document Version: 3.0. For hardware Version: 4. For firmware Version: Date: April 2014

DEV-1 HamStack Development Board

Building the FlipChip Tester

RS-232 to Logic Level Adapter with DB9M Connector and Power LED

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

ARDUINO MINI 05 Code: A000087

Atmel AVR datasheet. Matrix Multimedia Atmel AVR Board EB Contents

SK18A. 18 Pins PIC START-UP KIT. User s Manual V1.1. Dec 2007

If You Need Help. Registering Your PAK-IV PAK-IV

AKKON USB CONTROLLER BOARD

Lesson 14. Title of the Experiment: Introduction to Microcontroller (Activity number of the GCE Advanced Level practical Guide 27)

LIN bus board datasheet EB

Note that FLIP is an Atmel program supplied by Crossware with Atmel s permission.

Sierra Radio Systems. HamStack. Project Board Reference Manual V1.0

MX Educational Target User Manual

EE 354 August 1, 2017 Assembly of the AT89C51CC03 board

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system.

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

LED Knight Rider. Yanbu College of Applied Technology. Project Description

DIRRS+ Digital Infra-Red Ranging System Ideal for robotics projects. Singles (SKU # Pack (SKU #35100)

MICRO-1356 MULTI-PROTOCOL READER

CAUTION: TTL Only, Do Not Use ± 12 V RS-232

Build the Machine Science XBoard, with a programmable microcontroller.

USB485. USB to RS485 Converter Card. User Manual for connecting with Windows Vista Version 1.01

Lab 0: Wire Wrapping Project: Counter Board

PIC-P28-USB development board Users Manual

Centre for Instrumentation, Control and Automation User s Guide to the MAD 2 Microcontroller Board

Getting Started with STK200 Dragon

Phi-panel backpack assembly and keypad options Dr. John Liu 12/16/2012

RM024 DVK USER GUIDE VERSION 1.2

Laboratory 10. Programming a PIC Microcontroller - Part II

OpenSprinkler v2.1u Build Instructions

SK40C ENHANCED 40 PINS PIC START-UP KIT. User s Manual V1.3. March 2012

Sierra Radio Systems. Digital Compass. Reference Manual. Version 1.0

Typical applications where a CPLD may be the best design approach:

ICD Module (P/N ) Instruction Manual

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6

ROTOR CONTROL DXA. de K4JRG. User s Manual

Laboratory Exercise 7 - Extended I/O & Parallel Processing

QUASAR PROJECT KIT # ATMEL AVR PROGRAMMER

Linksys WAP54G Max233 Adapter (AD233BK w/ CTS/RTS pinouts)

Freeduino USB 1.0. Arduino Compatible Development Board Starter Guide. 1. Overview

CONNECTING YOUR PC TO THE USB EVALUATION BOARD

This 4-port RS-422/485 Adapter is provided with an external switching power adapter in the package.

1/Build a Mintronics: MintDuino

BV4626 General Purpose I/O. Product specification. Mar 2010 V0.a. ByVac Page 1 of 13

Manual of Board ET-PIC STAMP 18F8722-K22 ET-PIC STAMP 18F8722-K22

PCL Port RS-232 Interface Card

User Manual VScom PCI Cards VScom Industrial Card

Transcription:

APP-II PIC Development Kit 2001-2003 by AWC AWC 1279 FM 518 #2 Kemah, TX 77565 (281) 334-4341 http://www.awce.com V1.3 7 Sep 2004

Table of Contents Overview...1 If You Need Help...1 What Else You'll Need...1 Features...1 Assembly...2 GPMPU28-Based Kit...2 Experimenter s Kit...3 Testing...3 Programming...5 Internals...5 Resources...7 APP-II Include File...10 Notes...12

Overview The APP-II allows you to develop PIC code for the popular PIC16F87x microcontroller. The basic kit includes a special PIC16F873 (28 pin microprocessor) that operates at 20MHz and a 20MHz crystal. The full kit also includes an RS-I serial interface kit (pictured on the front cover). You'll find the RS-I manual included with that kit. If you did not get the full kit, you'll need some way to connect an RS-232 port from your computer to the APP-II chip. This requires some sort of level conversion (such as a MAX232 chip, which is what the RS-I uses). You can not directly connect a PC's RS-232 port to the APP-II. If You Need Help If you require assistance, please feel free to contact us. The best way to get support is via e-mail (stamp@al-williams.com). However, you may also call between 9AM - 4PM Central Time at (281) 334-4341. You can also fax to (281) 754-4462. Be sure to check out our Web page for updates at www.awce.com. What Else You'll Need In addition to the APP-II kit, you'll also need a few other easy to obtain items: A solderless breadboard or other substrate to build the circuit on. A 5V regulated power supply. MPLAB, the free software from Microchip (or another development tool that produces 8-bit hex files) A serial cable (a DB9 male to female, if you are using a PC). Features 1

The PIC16F873 core of the APP-II has 5 channels of 10-bit A/D, up to 19 digital I/O, and a hardware serial port usable by your programs. The device has 192 bytes of RAM, 256 bytes of EEPROM, and 3836 program words. Assembly There are two versions of the APP-II. The experimenter s kit includes an RS-I kit and requires you to build your PIC circuit on a solderless breadboard or other medium. The standard version includes a PC board that holds the PIC, an optional power supply, and other required circuitry. GPMPU28-Based Kit If you have the GPMPU28 board that is, you have the standard version please refer to the GPMPU28 manual (included) for details about how to build the circuit. Please note, that the schematic differs slightly from the one in this manual (R3 is not present on the GPMPU28 board and is not needed). The GPMPU28 manual has the correct schematic. Note that the board is slightly modified for the APP-II kit. Please follow these directions to modify the board for this kit: At the bottom of the board, there are three headers marked JP1, JP2, and JP3. Pin 1 is to the left (see the back of the GPMPU28 manual). The board has been modified so that pin 2 of JP1 and JP2, along with pin 1 of JP3 are isolated from their normal connections. Solder a two-pin header (included with the kit) into JP2 pin 1 and 2. This is the APP-II program jumper. On the right side of the board, there are two holes marked CTS and RB3 (the RB3 marking is under the CPU). You will install a 1K resistor in these holes. IMPORTANT: the resistor installs vertically. Place the body of the resistor flush with the RB3 hole in the board. Bend the opposite lead over and place it in the CTS hole (not the RB2 hole 2

which is adjacent). Solder. Do not place the resistor body flush with the CTS hole you will need the wire in CTS for the next step. With ordinary hook up wire, form a connection from JP3 pin 1 to the resistor you soldered in the last step. Loop the wire around the wire lead in the CTS hole and solder. Be careful not to desolder the 1K resistor in the process. Experimenter s Kit If you kit includes an RS-I, it is in kit form, and you'll need to assemble it first. Refer to the RS-I manual included. Next, build the circuit shown in Figure 1 on a solderless breadboard. Keep the wires to the resonator neat and short. The outer pins of the resonator are interchangeable. Be sure to connect power to the RS-I. You won't use the last two pins of the RS-I board in this project (although you can connect them to any of the APP-II's I/O pins for your own projects). If you have trouble getting JP1 or the switch to stay in your breadboard, try spreading the pins that insert into the breadboard a bit with a pair of pliers. Also, you can use pliers to move the plastic insulator so that there is the same length of pins above and below the insulator, which can also help. Testing The APP-II is shipped with a test program already on board. Place the shorting cap (jumper) on JP1 (JP2 in the PCB version) and connect a voltmeter or a logic probe on RB0. When you apply 5V to the circuit, RB0 should go high for approximately one second and then go low for one second. The LED on the GPMPU board will also blink. This should repeat indefinitely. If this doesn't happen, disconnect the power immediately and check all connections. 3

Once the RB0 test is successful, connect your PC to the RS-I's connector. Start a terminal program (such as Hyperterminal, which comes with Windows). Make sure that the port you want to use is not in use, and that the complimentary port is also not in use (most PCs can't use COM1 and COM3 or COM2 and COM4 at the same time). The rest of this discussion will assume you are using Hyperterminal. When you start Hyperterminal it will ask you to create a new connection. Call it APPII (or any name you like). The prompt will ask you to enter a phone number and will show a box that contains the ID of your modem. You can also select a direct COM port in this box, and that's what you'll do. Pick the COM Port you are using to connect to the APP-II. Next, Hyperterminal will prompt you for serial port parameters. The APP-II uses 19200 baud (19.2 kbaud), 8 bits, 1 stop bit and no parity. Most importantly, you must set the handshaking to Hardware (some programs call this RTS/CTS handshaking). Once you've set up the connection, you should be able to see hex numbers displaying on the terminal. This shows that your RS-232 connection is working. If you don't see the output (but RB0 is still pulsating) check the RS-I wiring and the settings on the terminal program (for example, some programs require you to use a connect command to start communications). If you are using Hyperterminal, you should also bring up the File Properties menu. From there, select the Settings tab and then press ASCII Setup. Make sure Echo typed characters locally is not checked (it shouldn't be). Also check Append line feeds to incoming line ends. Select TTY as the emulation type. Then dismiss the dialog boxes by pressing OK twice. Congratulations! Your APP-II is working. Now you can do some programming. 4

Programming To assist you further in programming, you can download a few sample HEX files from our Web site (www.awce.com). One of these is the test program that is running on the APP-II right now. To test the programming feature of the APP-II, remove the shorting cap (jumper) from JP1 (JP2 on the PCB version) and press the RESET button. On your terminal screen you should see a > character this tells you the APP-II is ready to receive a hex file. Suppose you select the 1st.hex from the Web site. If you look at this file with notepad or a similar text editor you will see that it is in hex format (the source code is in 1st.asm). You can send this hex file directly to the APP-II. For Hyperterminal, the easiest way to do this is to select the Transfer Send Text File menu command. Just pick the hex file you want to download and press OK. You can also copy the hex code to the clipboard and then paste it to the terminal program. The APP-II will echo the characters you send back to you so you can check its progress. If it encounters an error, the programming will stop with an @ character displayed on the terminal. A! character appears when programming is complete and successful. To run the new program, replace the jumper cap on JP1 (JP2 on the PCB version) and press the reset button. This is the basic steps you'll use to program the APP-II each time you want to run a program. You can write your own programs using any language that generates 8 bit hex files like MPLAB from Microchip. Internals The APP-II is actually a PIC16F873 that operates at 20MHz. You can find documentation for this device at the Microchip Web site. However, the APP-II environment makes programming a little different. In particular: 5

The top program address you can use is 0x0EFA. Your program must execute a GOTO within the first four instructions (starting at 0). In addition, no GOTOs should target locations 0 through 3. Usually, this space will contain a jump around an interrupt routine, anyway, so this is not a big restriction. Port B pin 3 is not available for your use. Although you can use the serial port in your own programs, you must be able to configure the two serial port pins for serial I/O to program. Therefore, we don't recommend you use the serial port for anything other than a serial port. For programming, the APP-I must use a 20MHz clock. In addition, you can make calls to the APP-II's library routines to perform useful tasks. You can download APPII.INC from our Web site which has definitions for these routines along with examples of their use. The calls you can make are: SERIALINIT Initialize the serial port to 19.2Kbaud (assumes 20MHz clock). Changes register bank to 1. SERIALSEND Sends the character in W to the serial port; returns with bank 0 selected. SERIALRCV Receives a character from the serial port to W. Returns with bank 0 selected. HEXOUT Writes the data in INDF (pointed to by FSR) to the terminal as a 2 digit hex number. Returns with bank 0 selected. 6

HEXOUT0 Writes the least significant 4 bits of W out as a single hex digit. Returns with bank 0 selected. DELAY Delays the number of clocks specified in the W register (from 11 to 255). Does not count the cycle required to load W, so the actual delay is from 12 to 256 cycles (2.4uS to 51.2uS). Does not change bank. GETHEX Reads two hex digits from the terminal and leaves the result in register 0x20. Returns with bank 0 selected. Resources http://www.awce.com/app2.htm Examples and include files. http://www.awce.com/classroom Tutorials. http://www.awce.com/seabass.htm - Basic Compiler for APP-II. http://tutor.al-williams.com/picc1.htm - C compiler for APP-II. http://www.microchip.com Download manuals for the PIC and MPLAB for free. http://www.piclist.com Information and help about the PIC. http://www.hilgraeve.com/htpe/ - Download the latest Hyperterminal; free for personal use. http://hp.vector.co.jp/authors/va002416/teraterm.html A freeware terminal. 7

Figure 1. Experimenter s Version Schematic 8

1K resistor between RB3/CTS (body flush with RB3) Wire jumper to lead at CTS hole Lead for 1K resistor and wire jumper to JP3-1 Two pin header between JP2 pin 1 and 2 Pin 1 Figure 2. GPMPU28 Modifications 9

APP-II Include File ; Defines for APP-II routines ; Description: Set up RS232 port (19.2K baud) ; Call with bank= 0 ; Returns with bank= 0 SerialSetup EQU 0x0F03 ; Description: Send data in W to RS232 ; Call with bank= Any ; Returns with bank= 0 SerialTransmit EQU 0x0F14 ; Description: Read character from RS232 to W (waits) ; Echos character back to sender ; Call with bank= Any ; Returns with bank= 0 SerialReceive EQU 0x0F0E ; Description: Write byte at FSR to RS232 as ASCII hex ; Call with bank= Any ; Returns with bank= 0 Hexout EQU 0xF1A ; Description: Writes least significant 4 bits of W out as ASCII hex ; Call with bank= Any ; Returns with bank=0 Hexout0 EQU 0xF1D ; Description: Delays # of cycles in W (11 to 255) ; does not count time to load W or PCLATH, if necessary ; Call with bank= Any ; Returns with bank= No change Delay EQU 0xF23 ; Description: Writes data at EEDATH:EEDATA to EEADRH:EEADR ; (Flash memory) ; Call with bank= Any ; Returns with bank= No change FlashWrite EQU 0xFBF 10

; Description: Read word from EEADRH:EEADR to EEDATH:EEDATA ; (Flash memory) ; Call with bank=any ; Returns with bank=2 FlashRead EQU 0xFCA ; Description: Read a hex byte from RS232 to W & location 0x20 ; Call with bank=any ; Returns with bank=0 ; warning routine uses ; RAM 0x20 GetHexByte EQU 0xFAD 11

Notes 12