Microchip 18F4550 Interface, Signal conditioning, USB, USB- RS-232, 16x2 LCD Interface

Similar documents
1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet Example Application...

EXPERIMENT 4: Parallel Input/Output. Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing

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

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

1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4

Explanation of PIC 16F84A processor data sheet Part 1: overview of the basics

Laboratory Exercise 5 - Analog to Digital Conversion

The University of Texas at Arlington Lecture 5

TDSDB Features. Description

Dept. of Computer Engineering Final Exam, First Semester: 2016/2017

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

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1.

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Analog Output with a Digital to Analog Converter

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

JUNEBUG PIC LABORATORY

Laboratory: Introduction to Mechatronics

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

Accurate Time and Interrupts

PICado Alpha Development Board V1.0

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

ME 515 Mechatronics. A microprocessor

Development Hardware. Target Board and In-circuit Debugger

Getting acquainted with the development tools June 27, 2006 ELE492 Embedded System Design Exercise 1

Development board for PIC24FJ128GA010. with 262k TFT color LCD module

The University of Texas at Arlington Lecture 3

Bolt 18F2550 System Hardware Manual

Microprocessors B Lab 1 Spring The PIC24HJ32GP202

ET-PIC 24 WEB-V1. o Central Processing Unit (CPU) o System. o nanowatt Power Managed Modes. o Analog Features

Embedded Systems. PIC16F84A Sample Programs. Eng. Anis Nazer First Semester

C and Embedded Systems. So Why Learn Assembly Language? C Compilation. PICC Lite C Compiler. PICC Lite C Optimization Results (Lab #13)

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

PIC 16F84A programming (II)

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Flow Charts and Assembler Programs

IFC-MB00 Interface Free Controller Main Board

Outlines. PIC Programming in C and Assembly. Krerk Piromsopa, Ph.D. Department of Computer Engineering Chulalongkorn University

University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory

Midrange 8b PIC Microcontrollers. ECE Senior Design 14 February 2017

/* PROGRAM FOR BLINKING LEDs CONEECTED TO PORT-D */

Capacitive Touch Remote Control Reference Design User s Guide

Getting Started with SKPIC32

Evaluation board for Microchip 100-Pin General Purpose Microcontrollers

User Manual For CP-JR ARM7 USB-LPC2148 / EXP

ECE Homework #3

Physics 335 Intro to MicroControllers and the PIC Microcontroller

C:\Users\cunningh\StaysOnPC\ME430 Downloads & Projects\exam2_problem1\problem1Cunningham.c

Trends in Prototyping Systems. ni logic Pvt. Ltd., Pune, India

CHAPTER 6 CONCLUSION AND SCOPE FOR FUTURE WORK

APPLICATION NOTE Wire Communication with a Microchip PICmicro Microcontroller

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester

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

MPLAB C1X Quick Reference Card

Microchip Corporate Applications, Aug 2005 Dennis Lehman, Corporate Applications Engineer

C8051F00x/01x-DK C8051F00X/01X DEVELOPMENT KIT USER S GUIDE. 1. Kit Contents. 2. Hardware Setup using a USB Debug Adapter

MPLAB X IDE PROJECTS Microchip Technology Incorporated. All Rights Reserved DEV Slide 68

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

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

Lecture (04) PIC16F84A (3)

Dwarf Boards. DB057 : 40-pin controller board

WIZTECH AUTOMATION SOLUTIONS (P) LTD., An ISO 9001:2000 and IAO certified company

THE LAB WORKSHOP MODELS ON MICROCHIP s PIC MICROCONTROLLERS IN EET PROGRAM

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

ATHENA32 PIC32 Evaluation Board ATHENA32. Product Datasheet. Francesco Ficili Date 13/01/2019. Pag. 1

PIC KIT 2 BASIC-USERS GUIDE FEMTO ELECTRONICS

1. About this document General information Board layout Testing this product Circuit description...

Hong Kong Institute of Vocational Education Digital Electronics & Microcontroller. 8. Microcontroller

Human Response Timer

Outline. Micriprocessor vs Microcontroller Introduction to PIC MCU PIC16F877 Hardware:

P89V51RD2 Development Board May 2010

MICROPROCESSORS A (17.383) Fall Lecture Outline

Reprinted by permission of T&L Publications Inc. Copyright 2001 USB MICROCONTROLLERS FOR THE MASSES

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

AKKON USB CONTROLLER BOARD

Weekly Report: Interactive Wheel of Fortune Week 4 02/014/07-02/22/07 Written by: Yadverinder Singh

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4

)8-,768'HY.LW 2YHUYLHZ. )XMLWVX0LNURHOHNWURQLN*PE+ Am Siebenstein Dreieich-Buchschlag, Germany

DESIGN AND FABRICATION OF FARE METER OF TAXICAB USING MICROCONTROLLER

Usb Universal In-circuit Programmer Pic Avr Arm Msp 8051 Eeprom

EECE.3170: Microprocessor Systems Design I Spring 2016

EB-51 Low-Cost Emulator

University of Hawaii EE 361L MPLab Quick Tutorial and Project 2.1 Last updated September 1, 2011

HemiSSon Flex External Programmer

LBAT90USB162 Atmel. LBAT90USB162 Development Board User s Manual

1. SOFTWARE Integrated Design Environment MPLAB IDE

AC/DC. Adapter. Ribbon. Cable Serial. Serial. Adapter. Figure 1. Hardware Setup using an EC2 Serial Adapter

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

Jordan University of Science and Technology Electrical Engineering Department Microcontrollers and Embedded Systems Spring 2011

Embedded System Design

LAB WORK 2. 1) Debugger-Select Tool-MPLAB SIM View-Program Memory Trace the program by F7 button. Lab Work

Goal: We want to build an autonomous vehicle (robot)

DERTS Design Requirements (1): Microcontroller Architecture & Programming

VM134 (K8076) QUICK GUIDE

ET-BASE AVR ATmega64/128

ELEMENTZ ENGINEERS GUILD PVT LTD. Embedded Module Manufacturers and Distributors

Experiment 7:The USART

Laboratory 10. Programming a PIC Microcontroller - Part II

Programming in the MAXQ environment

ECE 354 Computer Systems Lab II. Interrupts, Strings, and Busses

DEV-1 HamStack Development Board

Transcription:

Emtron Technologies Pvt. Ltd. Flat No-101, B3 Wing, 1 st Floor, Divyam Hights, Gilbert Hill, Shreenath Nagar, Andheri West, Mumbai-58 +91-8080181911 E-mail: emtron.tech@gmail.com, www.emtrontech.in Microchip 18F4550 Interface, Signal conditioning, USB, USB- RS-232, 16x2 LCD Interface This development board centred on PIC18F4550 M 8-bit RISC micro controllers from Microchip. This controller has 32K flash and 2K RAM. In built 10-bit, up to 13-channel Analog-to-Digital Converter, Four Timer modules (Timer0 to Timer3), Three External Interrupts, Four Crystal modes, including High Precision PLL, Supports up to 32 Endpoints (16 bidirectional), Interface for Off-Chip USB Transceiver. This module of micro controllers is extensively used for embedded and real-time applications in industry. This board is designed to be a general-purpose development board for Single Chip MCU applications that may be used as an instructional learning aid and also as a development tool in R&D labs in industries. Board Features: PIC18F4550-based board developed (TQFP-44 package) USB powered and programmable Interface. Standard +5v Regulated Power Supply. Serial Port Interface through FT232 UART-USB converter. Large number of on-board I/Os. Connectors are made available for the interfacing of standard I/O such as switches/leds and LCD. Compatible with standard Microchip Technology software tools (MPLAB IDE and HID Boot loader V2.6a). PIC Kit3-Debugger Interface. I/O Connectors are compatible to standard interface like Sensors, Opt coupler, 4x1 KBD, Motors etc.

Circuit Diagram:

PCB Design:

MPLAB Compiler and Simulator Bootloader is required to make USB enable (programming it using PICKIT3 Programmer through Jtag Port) 1. Install MPLAB 2. Install c18 compiler (mplabc18-v3.46-windows-lite-installer.exe) 3. Install from the folder NET/ NETCFS Driver 4. Start MPLAB 5. Project->Projectwizard->select device (PIC 18F4550)->select language tool set-> select mpasmwin, mplink,mccc18,mplib provide path of all four like C:\Program Files\Microchip\mplabc18\v3.46\bin\mcc18.exe 6. Create example folder

7. add rm184550.lkr file to the project file (use rm184550lkr while compiling the programs to avoid boot loader overwriting 8. add source file (.c) 9. locate header files: Project -> built options -> project-> a. show directories for -> include search path -> New : C:\Program Files\Microchip\mplabc18\v3.46\h b. Library search path path -> New : C:\Program Files\Microchip\mplabc18\v3.46\lib c. Linker search path-> C:\Program Files\Microchip\mplabc18\v3.46\bin\LKR 10. configure -> select device->pic18f4550 11. Debugger -> select tool-> MPLABSIM (for simulations) 12. Build the file. 13. use HID-BootLoader for programming 14. For Programming Press fist BOOT- then RESET release RESET & then BOOT switches

Reference: http://www.microchip.com/stellent/idcplg?idcservice=ss_get_page&nodeid=1406&ddocname=en0 10014 For Existing Project: 1. to modify device: Configure-> Select Device PICKIT3: Start MPLAB IDE: Directly load Hex File 1. Programmer-> Select PICKIT3->Debugger-> Connect it 2. File-> import-> LED.Hex file 3. Programmer-> Program PICKIT3: Start MPLAB IDE : HID bootloader 1. Programmer-> Select PICKIT3->Debugger-> Connect it 2. File-> import-> USB Device - HID - HID Bootloader - C18 - PIC18F4550.Hex file 3. Programmer-> Program 4. To automatically load Program from Pickit for mass Programming: repeat above steps except step 3 3.Automatic Programmer-> Settings-> Programmer to go -> Send Image in Memory (Select)

Example Program: LED Blink #include <p18f4550.h> /*The following lines of code perform interrupt vector relocation to work with the USB bootloader. These must be used with every application program to run as a USB application.*/ extern void _startup (void); _RESET_INTERRUPT_VECTOR = 0x1000 void _reset (void) _asm goto _startup _endasm _HIGH_INTERRUPT_VECTOR = 0x1008 void high_isr (void) _LOW_INTERRUPT_VECTOR = 0x1018 void low_isr (void) /*End of interrupt vector relocation*/ /*Start of main program*/ void mymsdelay (unsigned int time) unsigned int i, j; for (i = 0; i < time; i++) for (j = 0; j < 710; j++);/*calibrated for a 1 ms delay in MPLAB*/ void main() TRISA = 0; while(1) LATA = 0x30;/*Toggling Port A.4, PORTA.5 pins*/ mymsdelay(1000); LATA = 0x00; mymsdelay(1000);

Example Program: Mixed C and Assembly Program //MPLAB C18 Microchip Inline Assembly // Page 18 (51288a.pdf) #include <p18f4550.h> /*The following lines of code perform interrupt vector relocation to work with the USB bootloader. These must be used with every application program to run as a USB application.*/ extern void _startup (void); extern void asm_delay (void); _RESET_INTERRUPT_VECTOR = 0x1000 void _reset (void) _asm goto _startup _endasm _HIGH_INTERRUPT_VECTOR = 0x1008 void high_isr (void) _LOW_INTERRUPT_VECTOR = 0x1018 void low_isr (void) /*End of interrupt vector relocation*/ /*Start of main program*/ void main() unsigned int count =0000; _asm /* User assembly code */ CLRF LATA, ACCESS CLRF TRISA, ACCESS again: MOVLW 0xFF MOVWF LATA, ACCESS CALL delay, BANKED MOVLW 0x00 MOVWF LATA, ACCESS CALL delay, BANKED

_endasm _asm delay: MOVWF count, 0 loop1: DECFSZ count, 1, 0 GOTO loop1 RETURN BANKED _endasm while(1) Example Program: Assembly Program #include<p18f4450.inc> CONFIG WDT=OFF; disable watchdog timer CONFIG MCLRE = ON; MCLEAR Pin on CONFIG DEBUG = ON; Enable Debug Mode CONFIG LVP = OFF; Low-Voltage programming disabled (necessary for debugging) CONFIG FOSC = INTOSCIO_EC;Internal oscillator, port function on RA6 org 0; start code at 0 Delay1 res 2 ;reserve 2 byte for the variable Delay1 Start: CLRF LATD CLRF TRISD CLRF Delay1 MainLoop: movlw 0xff ; movwf LATD Delay11: DECFSZ Delay1,1 ;Decrement Delay1 by 1, skip next instruction if Delay1 is 0 GOTO Delay11 Delay22: movlw 0x00 ; movwf LATD

DECFSZ Delay1,1 ;Decrement Delay1 by 1, skip next instruction if Delay1 is 0 GOTO Delay22 end GOTO MainLoop