Upload
saifuddin-khan
View
217
Download
0
Embed Size (px)
Citation preview
8/12/2019 SK40B User Manual
1/25
SK40B
PIC MICROCONTROLLER START-UP KIT
Users Manual
V1.2
August 2009
Information contained in this publication regarding device applications and the like is intended through suggestion only and may
be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. Norepresentation or warranty is given and no liability is assumed by Cytron Technologies Incorporated with respect to the accuracy
or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise. Use
of Cytron Technologiess products as critical components in life support systems is not authorized except with express written
approval by Cytron Technologies. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights.
8/12/2019 SK40B User Manual
2/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 1
Index
1. Introduction and Overview 2
2. Packaging List 3
3. Board Layout 4
4. Product Specification 6
5. Installation (hardware) 7
5.1 Loading Program Using UIC00A Programmer 7
5.2 Loading Program Using Bootloader 8
5.2.1 Bootloader for 16F 95.2.2 Bootloader for 18F 17
6. Getting Started 21
7. Warranty 23
Appendix A (schematic) 24
8/12/2019 SK40B User Manual
3/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 2
1. INTRODUCTION AND OVERVIEW
SK40B is enhanced version of SK40A. It is designed to offer an easy to start board for PIC
MCU user. However, all interface and program should be developed by user. This board
comes with basic element for user to begin project development. It offer plug and use
features. This kit is designed to offer:
Industrial grade PCB
Every board is being fully tested before shipped to customer
Compact, powerful, flexible and robust start-up platform
Suitable for hobbyists and experts
Save development and soldering time
No extra components required for the PIC to function
All 33 I/O pinsare nicely labeled to avoid miss-connection by users
Connector for UIC00A(low cost USB ICSP PIC Programmer) - simple and fast
method to load program
RS232 (Serial) hardware on board allowing alternative method to load program easilyvia bootloader
Fully compatible with SK40A
No more frustrated work plugging PIC out and back for re-programming
Perfectly fit for 40 pins 16F and PIC18F PIC
No more confusion between programmer and bootloader
With UIC00A, program can be loaded in less than 5 seconds
SK40A come with:
5V voltage regulator (1A max)
20MHz crystal oscillator
Reset button
1 x programmable push button
RS232 hardware for serial communication to PC
Connector for UIC00A
On/Off switch for main power
DC adaptor socket as power input
And all the necessities to eliminate users difficulty in using PIC
Users are able to utilize the function of PIC by directly plugging in the I/O components in
whatever way that is convenient to user. With UIC00A connector on board, user can startdeveloping projects and have fun with this kit right away. Of course, bootloader can still be
applied in loading program. This kit comes WITHOUTPIC microcontroller to provide the
freedom for user to choose PIC type.
This document explains the method to use SK40B.
8/12/2019 SK40B User Manual
4/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 3
2. PACKAGING LIST
Please check the parts and components according to the packing list. If there are any parts
missing, please contact us at [email protected].
1. 1 x SK40B board with all components shown soldered2. PIC MCU Not included, please purchase separately from Cytron website3. Serial Cable Not included, please purchase separately from Cytron website4. UIC00A Not included, please purchase separately from Cytron website5. User Manual Not included, please download from Cytron website
8/12/2019 SK40B User Manual
5/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 4
3. BOARD LAYOUT
A is a slide switch to On/Off the power supply from DC adaptor or Battery connector.
Pushing the switch down will ON SK40B.
B is a DC power adaptor socket for user to plug in DC adaptor. The input voltage should be
ranged from 7 to 15V.
Label Function Label Function
A Slide Switch for main power supply G 5V regulator
B DC power adaptor socket H Header pin and turn pin
C Battery connector I 40 pin IC socket for PIC MCU
D Power indicator LED J Reset buttonE Serial cable adaptor (female DB9) K Programmable push button
F Connector for UIC00A Programmer
BA CE
D
F
G
I
H
J K
Pin 1
of PIC
8/12/2019 SK40B User Manual
6/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 5
C is a 2510 2 way connector for battery input. The battery voltage should be between 7 to
15V. Please ensure the polarity of voltage is correctly plugged before power up SK40B. The
+ and -- is have been labeled at the side of connector.
D is an indicator LED for on board 5V regulator. It will light ON as long as the input power
is correctly connected and the slide switch is ON.
E is a serial cable connector, female DB9. It should be connected to male DB9 serial cable.
F is a 2x5 box header for UIC00A, USB ICSP PIC Programmer.
G is a 5V voltage regulator
H Consist of several line of header pin and turn pin. Header pin provide connector for user
to solder SK40B to prototype board and use the I/O of PIC MCU. It is fully compatible
between SK40A. Turn pin offer simple way to check voltage with multi-meter probe. 40 pins
of PIC MCU except OSC (connected to crystal) are extended out to these pin. There is anextra pin on top of MCLR which is labeled as Vin, is connected to the input power.
I 40 pin IC socket for user to plug in any 40 pin PIC MCU (8 bit). It can either be 16F or
18F PIC. Of course the IC package should be PDIP. Please ensure the first pin is at the top
side. Inside IC socket, there some electronics components, it include a 20MHz Crystal.
J is a push button with the function of Reset for PIC MCU.
K is a push button connected to RB0 of PIC MCU. This is an extra input button for user. It
can be programmed as an input switch.
8/12/2019 SK40B User Manual
7/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 6
4. PRODUCT SPECIFICATION
SK40B is designed to offer starting up platform for development, the specification of PIC
MCU used should be referred.
However, there is a limitation that user should beware of. The input supply should be from 7to 15V. Battery or DC adaptor can be used.
Note: Only 1 power supply should be provided to SK40B.
8/12/2019 SK40B User Manual
8/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 7
5. INSTALLATION (HARDWARE)
SK40B come with UIC00A ICSP USB programmer connector and bootloader capability to
offer simple way for downloading program. However, from user feedback and experience,
using UIC00A ICSP programmer is very easy and save plenty of development time.
5.1 Loading Program Using UIC00A Programmer
Connect SK40B as shown in following figure.
After plug in 40 pin PIC MCU (make sure the orientation is correct), SK40B should bepowered either from battery or DC adaptor. Now, the hex code is ready to be loaded to
SK40B. For the usage of UIC00A, please refer to UIC00A Users Manual.
RB7 and RB6 have been connected to UIC00A connector; both these pins are used for ICSP.
User is advice not to use these pin as input. Even when using as output, RB7 or RB6 pin are
recommended to be used in controlling non critical device such as LED, LCD, 7 segments or
buzzer. It is recommended to isolated ICSP signals from application circuit by using series
resistor (range 220 ohm and above). Furthermore, NO capacitance component (capacitor)
should be connected to these 2 pins. Please refer to UIC00A Users Manual for further
details.
FromUIC00A
8/12/2019 SK40B User Manual
9/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 8
5.2 Loading Program Using Bootloader
Among the many features built into Microchips Enhanced FLASH Microcontroller devices
is the capability of the program memory to self-program. This very useful feature has been
deliberately included to give the user the ability to perform bootloading operations. Devices
like the PIC16F877A or PIC18F452 family are designed with a designated boot block, asmall section of protectable program memory allocated specifically for bootload firmware.
Cytron Technologies have modified and applied bootloader firmware to PIC microcontroller
which is ready to be used with simplest hardware interface. This user guide note
demonstrates a very powerful bootloader usage for the PIC16F and PIC18F families of
microcontrollers. The guide for 16F bootloader is different from 18F bootloader. Thus, there
will be 2 sections to setup and use bootloader. In order to use bootloader function on SK40B,
PIC microcontroller must have bootloader firmware preloaded. Please download the
firmware from www.cytron.com.myand burn it to PIC microcontroller using programmer.
Once your program is ready and a hex file is generated, you must now use bootloader to load
your program into SK40B to run your program. Following description show the method indetail:
Plug in the microcontroller at the socket. Make sure that it is in the correct position asthe figure below.
After plug in 40 pin PIC MCU with bootloader firmware (make sure the orientation iscorrect), SK40B should be powered either from battery or DC adaptor. Now, the hex
code is ready to be loaded to SK40B.
Since SK40B have bootloader hardware, 2 pins have been used for bootloaderfunction. Pins that involved are:
- RC7, used as RxD and connected to MAX232
- RC6, used as TxD and connected to MAX232
Connect serial port cable to computer and other end to serial cable adaptor on SK40Bboard.
8/12/2019 SK40B User Manual
10/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 9
*CAUTION* The microcontroller should never be plug in the wrong position!
5.2.1Bootloader for 16F
Cytron Enterprises have developed a new bootloader firmware for 16F877A. Since 16Ffamilies have a wide range of microcontroller with plenty of memory size and configuration,
this bootloader is created base on PIC16F877A. It has following features:
a. Base on PIC16F877A, it should work for PIC listed below, however it have notbeen tested:
i. PIC16F873Aii. PIC16F874A
iii. PIC16F876A
b. With bootloader firmware resized in PIC, user code must start from address 0x200.
For assembly language, reset vector must start at address 0x200 while interruptvector should start at 0x204.
From PCs Serial
Port
8/12/2019 SK40B User Manual
11/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 10
c. The configuration bits of new program code will be ignored as it cannot be accessedin bootloader mode. The configurations of bootloader firmware are listed. If
configuration is need to be modified, please use programmer to do so.
i. Oscillator = HSii. Watchdog Timer = Off
iii. Power Up Timer = Oniv. Brown Out Detect = Offv. Low Voltage Program = Disabled
vi. Flash Program Write = Write Protection Offvii. Data EE Read Protect = Off
viii. Code Protect = Off
For source code written in C language with PICC Lite Compiler, there must be offset 200 in
the PICC Linker option (Please refer to the pictures below).
Select Project Build Options Project
Specify the offset 200
8/12/2019 SK40B User Manual
12/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 11
After generating hex code (with 0x200 offset) and setting up hardware connection, refer to
the following steps for setting up and use HyperTerminal.
1. HyperTerminal is software available in all windows.
2. Open the HyperTerminal: Click Start-> All Programs-> Accessories->Communications-> HyperTerminal3. Setting up the HyperTerminal (first time user):
a) Once you entered HyperTerminal, key in any name underName: and choose anyicons. Example: Name: Bootloader. Click OK upon completion.
b) Choose connect using:COM1, then click OK.
8/12/2019 SK40B User Manual
13/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 12
c) Choose the following details:Bits per second : 9600
Data bits : 8
Parity : None
Stop bit : 1
Flow control : None
After all the selection is completed, click OK.
d) Next, to change the character delay, select Properties-> Setting, go into ACSIISetup submenu. Change the character delay to 10 milliseconds. Please increase the
time delay if the bootloader fail to load program completely.
8/12/2019 SK40B User Manual
14/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 13
e) Then, save the file by selecting: File-> Save as. Key in the filename you prefer andpress save.
8/12/2019 SK40B User Manual
15/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 14
f) Close the HyperTerminal.
8/12/2019 SK40B User Manual
16/25
8/12/2019 SK40B User Manual
17/25
8/12/2019 SK40B User Manual
18/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 17
10.If bootloader firmware on PIC is corrupted, you will need to burn the firmware usingprogrammer. In this case the bootloader will not work. Please download the hex code
for PIC16F bootloader from Cytron website, the file name is 16F bootloader.hex.
2.5.2 Bootloader for 18F
After several feedbacks from customer, Cytron Technologies decided to use tinybootloader
from Claudiu. This bootloader shows great stability and simplicity to use. Since 18F families
have a wide range of microcontroller with plenty of memory size and configuration, this
bootloader is created base on PIC18F452/252. It has following features:
a. Only 100 bytes of bootloader firmware.
b. No more pressing boot button to enter boot mode, it will wait 1 second after reset.
c. No changes on linker file for those using c compiler.
d. Developed for PIC18F458/258/452/252, it should work for PIC listed below, howeverit have not been tested:
i. PIC18F242ii. PIC18F458
iii. PIC18F258iv. PIC18F442v. PIC18F248
vi. PIC18F448
e. For this version of bootloader, user needs to ensure that the GOTO must be in the first4 words of program. In other words, no more offset of program memory is
required. Please start your program at ORG 0x000 for assembly language. For C
compiler, no modification should be done on the linker file.
f. Although PIC Tiny Bootloader is able to write configuration bits and EEPROM, itrequires extra command to do so. Thus it is advice for user not to load the
configuration bits and use the configuration on the original firmware. The original
configuration for the source code are:
i. Oscillator = HSii. Osc. Swich Enable = Disabled
iii. Power Up Timer = Enablediv. Brown Out Detect = Disabledv. Brown Out Voltage = 4.5V
vi. Watchdog Timer = Disabled-Controlled by SWDTEN bitvii. CCP2 Mux = RC1
viii. Stack Overflow Reset = Disabledix. Low Voltage Program = Disabled
x. Code Protect = All Disabledxi. Data EE Read Protect = Disabled
8/12/2019 SK40B User Manual
19/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 18
xii. Code Protect Boot = Disabledxiii. Table Write Protect = All Disabledxiv. Data EE Write Protect = Disabledxv. Table Write Protect Boot = Disabled
xvi. Config. Write Protect = Disabled
xvii. Table Read Protect = All Disabledxviii. Table Read Protect Boot = Disabled
After generating hex code and setting up hardware connection, refer to the following steps for
setting up and PIC Tiny Bootloader.
1. Open the 18FBootloader folder (download from SK40A web page), there is aapplication file named tinybldWin.exe. Double click on it. A window will appear,
no installation is required.
2. Choose the baud rate (default is 115200) and COM port (Default is COM1)
8/12/2019 SK40B User Manual
20/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 19
a) Load the hex from theBrowseicon on the top right corner of the GUI.
b) Reset SK40A and click on Write Flash (within 1 second)
c) If device is found and Write OK, the new HEX file have been loaded, reset PICand wait for 1 second to execute the new program.
8/12/2019 SK40B User Manual
21/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 20
d) If new program is needed to be loaded again, just repeat the step from a to c.
3. If bootloader firmware on PIC is corrupted, you will need to burn the firmware usingprogrammer. In this case the bootloader will not work. User may get the firmware in
the 18F firmware of 18FBootloader folder which can be downloaded from SK40A
webpage. The file name is 18FBootloader v2.hex
Please refer to Appendix A for the detail of schematic. Do consider carefully these pre-
connect interface if development require those pins.
Note: New PIC will not work with bootloader, bootloader firmware is required.
8/12/2019 SK40B User Manual
22/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 21
6. GETTING STARTED
SK40B is ready to be plug and use, no extra driver or software is necessary. It is a hardware
platform, for those that use bootloader or UIC00A, please install the necessary driver or
configure the correct setting in window. SK40B is ready be used to start the electronics
interface. The I/O of the microcontroller can be access through few methods:
1. I/O port (Top)
Connect the components that needed onto the I/O port.
Extend the I/O port to another board using jumper wire
2. I/O pins (Bottom)
Plug the I/O pins of the Start-up Kit onto a breadboard. Then, access I/Opin through the breadboard.
8/12/2019 SK40B User Manual
23/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 22
Plug the I/O pins of the Start-up Kit onto a donut board. Solder the pinsonto the board to access the I/O.
8/12/2019 SK40B User Manual
24/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 23
7. WARRANTY
Product warranty is valid for 6 months. Warranty only applies to manufacturing defect. Damage caused by mis-use is not covered under warranty.
Warranty does not cover freight cost for both ways.
Prepared by
Cytron Technologies Sdn. Bhd.
19, Jalan Kebudayaan 1A,Taman Universiti,
81300 Skudai,
Johor, Malaysia.
Tel: +607-521 3178
Fax: +607-521 1861
URL: www.cytron.com.my
Email: [email protected]
8/12/2019 SK40B User Manual
25/25
ROBOT . HEAD to TOE
Product Users Manual SK40B
Appendix A