SK40C Rev2.0 User's Manual
SK40C Rev2.0 User's Manual
SK40C Rev2.0 User's Manual
HEAD to TOE
Product User’s Manual –SK40C Rev2.0
SK40C
40 PINS PIC
START-UP KIT
User's Manual
V2.0
JUNE 2015
INDEX
1. Introduction/Overview 3
2. Packing List 4
4. Dimension 6
5. Board Layout 7
6. Hardware 12
7. Software 23
8. Getting Started 28
9. Warranty 37
1. INTRODUCTION/OVERVIEW
SK40C is another version of 40 pins PIC microcontroller start up kit. 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 offers plug and use features. This kit is designed to offer:
Users are able to utilize the function of PIC by directly plug in the I/O components in
whatever way that is convenient to user. With UIC00A/B connector on board, user can start
developing projects and have fun with this kit right away. This kit comes WITHOUT PIC
microcontroller to provide the freedom for user to choose PIC type.
2. PACKING LIST
Please check the parts and components according to the packing list. If there are any parts
missing, please contact us at sales@cytron.com.my immediately.
SK40C is designed to offer starting up platform for development, the specification of PIC
MCU used should be referred.
Note: Only 1 power source should be provided to SK40C. Either from DC adapter,
USB port, external Vin or external 5V.
4. DIMENSION
5. BOARD LAYOUT
Top View
Bottom View
Side View
3. UART connector
Reserved for UART communication. Tx and Rx pin of SK40C are connect to RC6 and RC7
respectively. Ensure PIC Microcontroller chosen has the correct UART pin (RC6 and RC7).
4. LED Indicator
2 LEDs (connected to RB6 and RB7) as active High output for PIC MCU. These LEDs are
controllable from PIC MCU.
6. Reset Button
Push button with the function of Reset for PIC MCU.
8. LCD Contrast
5K of trimmer to set LCD contrast.
both these pins will connect pin 18 of PIC (VUSB on PIC18F4550) to 1uF capacitor. This
setting is necessary if USB peripheral is needed.
Connected to a preset to
3 Con Brightness adjust
adjust brightness
Table below shows pin connection for Turn pin of crystal oscillator
Pin Name Pin Function Connection
6. HARDWARE
SK40C comes with UIC00A/B ICSP USB programmer connector to offer simple way for
downloading program.UIC00A/B ICSP programmer is very easy programming tool and helps
to save development time.
After plug in 40-pin PIC MCU (make sure the orientation is correct) of your choice, SK40C
should be powered by DC adaptor. Now, the hex code is ready to be loaded to SK40C. For
the usage of UIC00A/B, please refer to UIC00A/B User’s Manual.
RB7/PGD and RB6/PGC are two pins that being used in ICSP program loading, and have
been connected to UIC00A/B connector and 2 LED indicators. User is advised not to use
these pins as input, because the input device may affect the ICSP process. Even when using as
output, RB7 or RB6 pin is 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/B User’s Manual for further details.
JP10 (PICkit port) is reserved for user to load program using PICkit2/3. This is alternative
way to load program besides using UIC00A/B. Below is some steps to load program using
PICkit.
● To use PICkit 3 as programmer, user has to solder 1x6 way right angle header pin to
JP10.
● Connect PICkit 3 at JP10. Ensure the arrow on SK40C is same with arrow at
PICkit 3.
● Plug the I/O pins of the Start-up Kit onto a breadboard. Then, extend the I/O port to
Input Output device using jumper wires.
● Plug the I/O pins of the Start-up Kit onto a donut board. Solder the pins onto the board
to access the I/O.
The 2x16 character LCD offers character display for embedded system. It can be used to
display numerical information, text message and also special symbol. 2 x 16 LCD is not
included in SK40C packaging list. User may purchase it separately.
● Solder LCD on to SK40C as shown. To enable LCD backlight (optional), solder JP8
to connect the LCD B/L.
Below shows the difference between LCD with backlight and LCD without backlight.
a) With backlight
b) Without backlight
● Beside, user may also use header pin and mini jumper to connect LCD B/L. Solder
header pin at JP8 and use mini jumper to connect LCD B/L. Header pin and mini
jumper is not included in SK40C packing list. Users need to buy separately.
● Potentiometer is used to adjust the contrast of LCD. Turn left or right to adjust the
contrast.
● Figure below shows an example connection of SK40C to external device via UART
port. This example connection shows UART pins of SK40C (PIC16F877A) is
connected to UART pins of SKPS. Tx and Rx pin of SK40C should be cross
connected to Tx and Rx pin of SKPS. In other words, Tx pin of SK40C should be
connected to Rx pin of SKPS, while Rx pin of SK40C should be connected to Tx pin
of SKPS. No extra component is necessary between these connections. For details
connection, please refer to sample schematic.
USB data pins (pin 23, D- and pin 24, D+) are connected to a mini-B USB port on SK40C
board for USB development. So far, Microchip has only 5 USB 8-bit microcontrollers in
40-pin PDIP package such as PIC18F4450, PIC18F4455, PIC18F4550, PIC18F4458 and
PIC18F4553. Microchip has USB framework/library to support USB on 8-bit, 16-bit and
32-bit MCUs. This framework/library is royalty free. Source code which called
MCHPFSUSB Framework is also includes example projects. Download the appropriate USB
stack for the target processor. It includes USB firmware for the microcontroller as well as a
USB device driver for the PC which allows the PC to treat the microcontroller as a USB
device. Classes supported include HID, CDC, MSD and generic.
● Connect USB mini-B cable to SK40C USB connector. Connect the other end of USB
mini-B cable to PC USB port. Make sure PIC used comes with USB peripheral.
● Make sure your crystal frequency is 20MHz (unless you change the configuration of
the MCHPFSUSB Framework) and jumper SEL USB is connected (soldering) as
shown below.
7. SOFTWARE
Cytron Technologies has provided the SK40C HID USB Bootloader firmware (edited form
MCHPFSUSB Framework). This firmware is currently configured to work with the
PIC18F4550 using the CYTRON SK40C. However, user can always use this code for other
USB microcontroller after doing some project modification. Loads the appropriate hex file to
PIC by using the programmer (UIC00A/B). Please be reminded that 8-bit PIC USB
microcontrollers in 40-pin PDIP package include: (By the time we develop the example hex)
● PIC18F4450
● PIC18F4455
● PIC18F4550
● PIC18F4458
● PIC18F4553
Cytron Technologies has provided all of PIC model USB Bootloader hex files inside the
“SK40C HID Bootloader Firmware (Hex file)” folder as shown as below.
This setup only valid for UART communication with computer using UC00A. It’s not valid
for USB at SK40C.
1. Open HyperTerminal. Enter a name and choose an icon for connection as picture
below then click OK.
3. Please follow step (4) to (6) if the COM port number is not confirm.
4. Go to Start, right click on My Computer and choose Properties.
6. At Device Manager, choose (COM & LPT) and USB Serial Port COM will be
visible. As an example (shown in following figure), COM Port for UC00A is
COM34. The COM Port is not definitely same for each computer. Usually, the COM
port is the largest USB Serial Port show in (COM & LPT). To make sure it, unplug
UC00A and plug in back. The COM port for UC00A disappears when we unplug
UC00A and appear when we plug in.
7. Set the “Port Setting” as picture below. Bits per seconds must be same with SK40C
Baud Rate in programming. After finish setting, click Apply and then click OK.
8. Click Properties button. ‘SK40C’ Properties will show. Choose Setting tab and click
ASCII Setup. Click on Echo typed characters locally and then click OK. Echo typed
characters locally is to display what is being typed on keyboard. User may click or
unclick Echo typed characters locally.
8. GETTING STARTED
SK40C is ready to be plug and use. It is a hardware platform, please install the necessary
driver or configure the correct setting in Window. SK40C is ready be used to start the
electronics interface.
Sample Source Code is provided to test the functionality of SK40C. Sample source code will
show LED blinking and Start up message on LCD. Sample source code can be downloaded
from SK40C product page. This sample source is provided for PIC 16F. Please refer
UIC00A/B User’s Manual to load hex code into PIC of SK40C.
LCD is not included in SK40C packing list. Please purchase it separately if displaying
message is necessary. Please refer Section 6.3 for interface SK40C with LCD Display.
1. Plug in 40-pin PIC MCU. Make sure the PIC model is 8-bit (All PIC16F and PIC18F
are 8-bit) and 5V power.
2. Connect Adaptor to SK40C DC Power Adaptor Socket. Connect UIC00A/B to ICSP
programmer. Switch on toggle switch. Load hex code (LED_Blink.hex) into 40 pin
PIC MCU using UIC00A/B. Please refer Section 6.1
3. LED1 and LED2 are blinking.
4. LCD Display will display “Cytron Tech.” on 1st line and “SK40C” on 2nd line.
8.2 UART
UART to Computer/Laptop
UC00A is a USB to UART converter which can be used for UART communication between
SK40C and Computer/Laptop. Please refer UC00A User’s Manual for details. We have
provided an example source code for UART communication between SK40C and Computer.
This example source code is provided for PIC16F.
1. Plug in 40-pin PIC MCU. No restriction to what type of 40 pin PIC MCU can be used
for SK40C, as long as it has UART peripheral.
2. Connect Adaptor to SK40C DC Power Adaptor Socket. Connect UIC00A/B to ICSP
programmer. Switch on the power. Load hex code (UART_PC.hex) into 40 pin PIC
MCU using UIC00A/B. Please refer Section 6.1
3. Connect UC00A to SK40C and Computer. Please refer Section 6.4 UART Interface
for connection between SK40C and UC00A
4. Setup HyperTerminal. Please refer Section 7.2
5. After all settings are completed, user may now check the functionality of SK40C
UART. Below show massage displayed in HyperTerminal if the example source code
is used.
UART to Microcontroller
Another possible usage of UART is to communicate with another embedded system or
microcontroller. For microcontroller to interface with SK40C, the minimum requirement will
be TTL UART (Universal Asynchronous Receiver and Transmitter) and 5V supply. As for
UART, a minimum of Receiver pin is required to receive command from SK40C.
1. Please refer Section 6.4 UART Interface for example connection between SK40C and
SKPS.
2. Sample source code is provided to show UART communication between SK40C and
microcontroller (SKPS). User may download the source code in Cytron website under
product page.
3. Connect Adaptor to SK40C DC Power Adaptor Socket. Connect UIC00A/B to ICSP
programmer. Switch on the power. Load hex code (UART_SKPS.hex) into 40 pin PIC
MCU using UIC00A/B. Please refer Section 6.1.
4. LCD will display “LEFT, RIGHT, UP and DOWN” if that button on PS2 Joystick is
pressed.
8.3 USB
This section shows example source code for LED Blinking using USB bootloader. User may
download the sample source code in Cytron website. The sample hex file is valid for
PIC18F4550 only. For non- PIC18F4550, user need to change the device and rebuild the
project to regenerate the new hex file.
1. Make sure your crystal frequency is 20MHz (unless you change the configuration of
the MCHPFSUSB Framework) and SEL USB is connected (soldering). Please refer
Section 6.5
2. Plug in 40-pin PIC MCU. Ensure that the PIC supports USB bootloader.
3. Connect Adaptor to SK40C DC Power Adaptor Socket. Connect UIC00A/B to ICSP
programmer. Switch on the power. Load the hex file of SK40C HID Bootloader
Firmware as mentioned in Section 7.1
4. After USB bootloader firm was loaded into PIC, unplug the UIC00A/B programmer.
To enter bootloader mode, press and hold SW2 then connect the mini USB port on
SK40C board to your PC, release SW2. Another way to activate the bootloader mode
is to press and holds SW2, press and release RESET button without unplug the USB
cable.
5. SK40C has secondary power supplied by USB port, so external power may not needed
for USB application. LED1 and LED2 will alternate blink at the time when in boot
mode. These messages will pop out one by one on your PC for first time plug in only.
6. Open the “HIDBootloader.exe” file in the folder. You may already have the .NET
framework installed on your PC, especially if you have already installed other
applications which were built with one of the Visual Studio 2005 .NET. If you do not
yet have it, the .NET framework can be freely downloaded from Microsoft's website.
Users of Windows Vista do not need to install the .NET framework, as it comes
pre-installed as part of the OS. The redistributables are currently (22 May 2008)
available at Cytron website under “Useful Document” of SK40C.
7. And this window will pop out and click “Open Hex File”
8. Search “SK40C 18F_USB Sample Program” folder which user has downloaded from
website. There are 3 sample programs which are LCD Display, LED Blinking and
UART. Click on LED Blinking folder.
9. Select the given hex file “SK40C sample code (bootloader).hex” folder and click
open. Note that the original sample hex file, “SK40C sample code (bootloader).hex” is
for PIC18F4550.
10. Click “Program/Verify” to load hex file to your PIC and programming status will be
shown as below. Next, click “Reset Device” to run your program. LED1 and LED2
will blink like strobe on police car if “SK40C sample code (bootloader).hex” is
loaded. LEDs will stop blinking if either SW1 or SW2 button is being pressed.
11. User need to do some modification for other USB PIC. Change the device by clicking
Configuration>>Select Device as shown below.
12. Choose decided PIC let say PIC18F4553 then click “OK”.
13. Edit the appropriate linker file. User MUST use the given remapped linker files for the
application if bootloader is used.
14. Right click the linker file under Linker Script folder and remove it.
15. Right click the Linker Script folder then click “Add Files”
16. This window will appears and search your file directory, select the appropriate linker
file. All these linkers are special modified for USB bootloader.
17. Lastly, do not forget to change the include file before rebuild it. User is free to edit the
sample program.
18. Make sure the linker file and the selected device is correct.
19. Click the “Build All” icon to rebuild the project and a new hex file will be generated
and it will replace the old hex file in folder directory then load it into your PIC by
using the Microchip USB HID Bootloader as mentioned from step 7 to step 10 in this
section. Make sure compiler used is C18 Compiler V3.32 or above.
9. WARRANTY
Prepared by:
Cytron Technologies Sdn. Bhd.
No. 16, Jalan Industri Ringan Permatang Tinggi 2,
Kawasan Industri Ringan Permatang Tinggi,
14100 Simpang Ampat,
Penang, Malaysia.
URL: www.cytron.com.my
Email: support@cytron.com.my
sales@cytron.com.my