serial bluetooth
2010

There are three ways to program a PIC microcontroller
- Using normal programming hardware (high volt programming HVP).
- Low volt programming (LVP).
- Bootloading.
The first two methods use the programming port of the PIC microcontroller labeled ICSP (In Circuit Serial Programming).
This port is shared between the existing pins of the microcontroller and after programming the pins revert back to normal microcontroller operation.
Note: To make ICSP work correctly you have to consider the effects and requirements of the ICSP programmer e.g. for HVP a high voltage exists at the Vpp pin (your circuit must be able to handle the high voltage – up to 13V). Also the loading for the other signals PGC and PGD must not be too high i.e. don’t put an LED on these pins that uses 20mA – if you did the voltage levels would not be high enough at the inputs to the PIC for programming.
It’s fairly easy to design for ICSP use by using isolation resistors to normal circuitry and choosing not to use heavy loads on these pins.
ICSP provides 6 connections from the pic ICSP programmer to your board as follows :
VPP – (or MCLRn) Programming voltage (usually 13V).
Vcc – Power (usually 5V).
GND Ground (zero volts).
PGD – Data usual port and connection RB7.
PGC – Clock usual port and connection RB6.
PGM – LVP enable usual port and connection RB3/RB4.
PIC Micro: High Volt Programming
To use the first method a hardware interface is needed or ‘PIC programmer’ to interface between the programming software (usually running on the PC) and the PIC chip. This hardware takes its information from the PC via one of three interfaces either:
- The RS232 COM port
- The Parallel port
- The USB port
You choose the interface you want to use and then choose an appropriate PIC programmer. The PC then communicates with the hardware generating the serial (ICSP) signals to translate the PIC hex file into a serial data stream suitable for the target microcontroller.
Note: Almost all PIC microcontrollers use the ICSP interface so once you have a HVP you can program virtually any PIC microcontroller. e.g. you can program 12F675, 16F84, 16F88, 16F877(A), 18F2550, 18F452 etc.
There are several programs for programming PIC micos e.g. ICPROG and many different hardware programmers.
PIC Micro: Low volt programming (LVP)
LVP is exactly the same as HVP except:
- The Vpp voltage is set to the normal supply voltage.
- The PGM pin indicates programming mode.
Note: In this mode you can not use the PGM pin for anything else
it is dedicated solely to LVP control.
Devices are manufactured with PGM mode enabled and the only way to turn off the PGM mode is to program it using an HVP programmer.
Note: Some PIC microcontrollers can only use the HVP method since for the LVP method you have to sacrifice one pin – PGM – (to tell the PIC Micro either that it is being programmed (high volts e.g. 5V) or that it is not being programmed (0V) ) and some PIC micros only have 8 pins e.g. 12F675. For this chip the PGM pin is not available so HVP is the only way.
The real benefit of using the LVP mode is that you can program several PIC Micros on a board without having to individually program each one – you could daisy chain each extra micro to a master micro which would then program each one in turn – and this is only possible since the Vpp signal is a normal logic level in LVP mode.
PIC Micro: Bootloading
Bootloading uses any available interface to load a program into program memory. It requires a bootstrap program to interpret the interface data and translate it into program memory instructions.
Note: Note only the newer devices that are capable of programming their own memory can use this method.
Typically a serial port is used for bootloading and the PIC micro bootstrap program will wait for a set time after power up listening on the serial port for a reserved word that tells the bootstrap program to start i.e. it listens for sequence of characters that is not normally used on the interface
Once it receives this sequence it enters bootstrap mode where a hex file is transmitted to the microcontroller over the interface. It interprets this and programs the memory of the microcontroller and then starts the program.
There are two issues with this method:
- You have to program the bootstrap code using HVP or LVP.
- It uses up some of the microcontroller resources.
Once programed it provides a convenient way of using the device as you won’t need programming hardware anymore and one major benefit is that you can re-program a device without undoing the equipment e.g. if you boxed up you project you could still re-program it using the serial port!
You can find more information from the website here and how to build a website like it here.
Copyright © John Main 2006 Free to distribute if the article is kept complete.
http://www.best-microcontroller-projects.com
|
|
Serial Adapter w/Bluetooth Serial Adapter w/Bluetooth Wireless Technology, Class 1… |
|
|
IOGear RS-232 Serial Adapter with Bluetooth Wireless Technology GBS301 (Black) $60.24 IOGEAR’s Serial Adapter with Bluetooth wireless technology brings wireless Bluetooth technology to your RS-232 serial equipment, allowing you to eliminate conventional cables. With a range up to 330 ft (100 meters), you can communicate with serial devices beyond the reach of conventional cables. Simply plug the wireless adapter into your serial equipment and transfer data to and from Bluetooth-ena… |
|
|
APPLE IMAC ALL IN ONE 27-INCH – 2.66GHz Quad-Core Intel Core i5, 8 GB 1066 MHz DDR3 SDRAM, 1TB Serial ATA Drive , 27-inch (viewable) LED-backlit glossy 16:9 widescreen TFT active-matrix display; 2560 by 1440 pixels, ATI Radeon HD 4850-512MB, AirPort Extreme 802.11n Wi-Fi wireless networking, Built-in stereo speakers, iSight camera , Bluetooth 2.1 + EDR (Enhanced Data Rate) wireless technology , Wireless Magic Multitouch Mouse, Wireless Keyboard, Mac OS X v10.6 Snow Leopard $2,499.00 APPLE IMAC ALL IN ONE 27-INCH – 2.66GHz Quad-Core Intel Core i5, 8 GB 1066 MHz DDR3 SDRAM, 1TB Serial ATA Drive , 27″ LED-backlit display with a widescreen 16:9 aspect ratio, 2560×1440 HD resolution, ATI Radeon HD 4850-512MB, Wireless Magic Multitouch Mouse, Wireless Keyboard, Mac OS X v10.6 Snow Leopard… |
|
|
Bixolon SPP-R200 – Receipt printer – B/W – direct thermal – Roll (2.3 in) – 203 dpi x 203 dpi – up to 189 inch/min – capacity: 1 rolls – Serial, USB, Bluetooth Bixolon mobile printer the SPP-R200 is an extremely small and lightweight direct thermal mobile printer for receipts/tickets and labels. It is a professional receipt printer that is the perfect choice wherever mobility is required such as bars, restaurants, and home delivery services or similar. It offers the highest operational comfort with its one-handed operation and easy-paper-loading.The SPP-… |
|
|
Socket Communications CS0400-479 Bluetooth Cordless Serial Adapter $120.99 Socket’s Cordless Serial Adapter with Bluetooth Wireless Technology eliminates your conventional RS-232 serial cable, providing an easy-to-use, invisible connection. This small adapter allows any device with a standard 9-pin serial port to communicate wirelessly. It will communicate with another Cordless Serial Adapter or any Bluetooth enabled device. Take advantage of Personal Area Networking eas… |
|
|
Deluo Keychain GPS for Smartphone, Notebook Computers and BlackBerry $29.99 You can have GPS functionality on your phone; unveil the power of your Smartphone or even your laptop with the Deluo Keychain Bluetooth GPS! It’s so easy to get up in the morning, grab your keys, your phone and just go, wherever, whenever you want. This sleek, compact wireless wonder will add GPS functionality, transforming your phone into a complete navigation solution with no monthly service or … |
|
|
Citizen CMP-10BT Mobile Receipt Printer $359.99 Citizen CMP-10BT Mobile Receipt Printer |
|
|
Black Series by Shift3 Bluetooth Handsfree Auto Speaker (Case of 2) $44.99 Drive safely with this Bluetooth hands-free auto speakerCell phone device features a USB 2.0 port for charging phones and MP3 playersSpeaker features a volume control with LED indicator |
|
|
Sony VAIO Bluetooth GPS Receiver for UX Series (Refurbished) $85.99 Bluetooth GPS receiver module for Sony Vaio UX series Cell phone accessorycompatibility: VGN-UX180P;VGN-UX280P Hands-free device features AC adapter and belt strap |
Comment