element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Blog Kinetis Design Studio 3.0 Kinetis SDK 1.3 Processor-Expert using FRDM-KL43Z: Setup configuration for KSDK1.3 and Exploring on Segment LCD using KL43Z Freedom board: Part-1
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 26 Nov 2015 7:37 AM Date Created
  • Views 1537 views
  • Likes 1 like
  • Comments 5 comments
  • kds+kdsk1.3.0
  • frdm-kl43z
  • ksdk1.3.0
  • slcd
  • sdk
Related
Recommended

Kinetis Design Studio 3.0 Kinetis SDK 1.3 Processor-Expert using FRDM-KL43Z: Setup configuration for KSDK1.3 and Exploring on Segment LCD using KL43Z Freedom board: Part-1

bheemarao
bheemarao
26 Nov 2015

This tutorial brings you on getting working with 4-digit (4X8) segment LCD present in KL43Z freedom board.

 

  Installing the Kinetis SDK v1.3.0 / Eclipse Update

 

Download SDK1.3.0 from below link and install it. By default it gets installed in “C:\Freescale\KSDK_1.3.0” folder

https://freescale.flexnetoperations.com/control/frse/product?entitlementId=123812727&lineNum=1&authContactId=73533311&au…

 

Before using KDS IDE with KSDK, the KSDK Eclipse Update must be applied. Without this update, Eclipse cannot generate KSDK-compatible projects.

To install the update, follow these instructions:


Select "Help" -> "Install New Software"

image

 

In the Install New Software dialog box, click the "Add" button in the upper right corner. Then, in the Add Repository dialog, select the "Archive" button.

image

In the Repository archive dialog box, browse the KSDK install directory folder and select the KSDK_1.3.0_Eclipse_Update.zip file.

image

 

Click "Open", and the "OK" button in the Add Repository dialog box. Then The KSDK update shows up in the list of the original Install dialogs. Check the box to the left of the KSDK Eclipse update and click the "Next" button in the lower right corner.

 

Follow the remaining instructions to finish the installation of the update.


    Build the platform library


The platform library is required to create a NEW project and does not build without it.

 

Select "File->Import" from the KDS IDE menu. In the window that appears, expand the "General" folder and select


"Existing Projects into Workspace". Then, click the "Next" button.

image

image

Click the "Browse" button next to the "Select root directory:" option. And choose the folder

“C:\Freescale\KSDK_1.3.0\lib\ksdk_platform_lib\kds\KL43Z4” as shown below

image

To Build the platform library click on hammer button as shown below:

image


The library starts building after clicking on the hammer button

The libraries file “libksdk_platform.a“ is generated.

 

    LCD connection Details:


Segment LCD modules are simple and very low power LCD displays. They can have a large number of segments in the form of dots (pixels) or symbols (parts of 7 segment characters or special images) and a large number of pins to enable these segments to be controlled. SLCD controllers tend to have a high number of pins to handle large GLCD modules. These pins can be configured as back-plane or front-plane pins and generates the required multiplexing and waveforms needed to continuously refresh the SLCD.

 

Rather than have one connection for each segment, the segments are typically multiplexed so that less control lines are needed to control the same number of individual segments.


To illustrate this, the Lumex LCD-S401M16KR, as used on the Freescale FRDM-KL46Z is used as reference. The following is an excerpt from its data sheet showing its characteristics and how its 12 pins are connected to its elements:

 

Characteristics of Lumex LCD-S401M16KR are given below:

image

Connection details of Luminex LCD-S401M16KR

image

And the display’s elements are illustrated below according to their references in the Connection table in the original data sheet:

image

                                  s401 segments layout


This display has 12 pins, which are all connected to a driving pin on the SLCD controller. There are 4 common pins and so the driving mode is ¼ duty cycle, since each of the common pins are driven for ¼ of the cycle period. Each of the common lines is connected to 8 LCD segments. Taking COM0 as an example the 8 segments that are controlled by it are show in the following diagram.

image


This means that when the COM0 line is being driven up to 8 segments can be turned on, depending on the state of the 8 segment pins. The 8 segment pins (5..12) thus control these 8 segments during this driving phase and can turn all on, all off, or an combination in between.

Since there are 4 phases (4 COM pins), each controlling 8 segments during that phase, a total of 32 segments can be controlled – this corresponds to the number of segments that the SLCD physically has. The other 3 COM drive combinations are not shown in a diagram here but can be easily read from the original data sheet table.

 

In order to configure the SLCD driver to match this display 4 of its LCD pins are configured as COM drive pins and 8 as segment drive pins. The COM drive pins are configured to drive in different phases (eg. COM0 in phase 1, COM1 in phase 2, COM2 in phase 3 and COM3 in phase 4, where each of the phases are repeated according to ¼ duty driving mode). The duty mode and any other specific configuration are also set in the SLCD controller.


s401 pin

Pin connection

KL43 LCD Pin

1

(COM0)

LCD_P59

2

(COM1)

LCD_P60

3

(COM2)

LCD_P14

4

(COM3)

LCD_P15

5

(1D/1E/1G/1F)

LCD_P20

6

(DP1/1C/1B/1A)

LCD_P24

7

(2D/2E/2G/2F)

LCD_P26

8

(DP2/2C/2B/2A)

LCD_P27

9

(3D/3E/3G/3F)

LCD_P40

10

(DP3/3C/3B/3A)

LCD_P42

11

(4D/4E/4G/4F)

LCD_P43

12

(COL/4C/4B/4A)

LCD_P44



          Tutorial instructions to demonstrate sLCD

 

Create new project in KDS 3.0 with KSDK 1.3.0

image

Type the project name “SLCD Test-KL43Z” choose the board FRDM-KL43Z, mark off options Kinetis SDK and Processor Expert as shown in below snaps

image

image

image

image

Now, your project structure looks like this in the project explorer and Processor Expert windows:

image

 

Set Processor Expert Settings

Now, go to Components Library, find fsl_slcd component using filters KSDK 1.3.0 and Applicable to Project and by double click add the component to the Processor Expert Component View of your project.

image

Now we need to configure the slcd pins according to the lcd connection as shown below:


s401 pin

Pin connection

KL43 LCD Pin

1

(COM0)

LCD_P59

2

(COM1)

LCD_P60

3

(COM2)

LCD_P14

4

(COM3)

LCD_P15

5

(1D/1E/1G/1F)

LCD_P20

6

(DP1/1C/1B/1A)

LCD_P24

7

(2D/2E/2G/2F)

LCD_P26

8

(DP2/2C/2B/2A)

LCD_P27

9

(3D/3E/3G/3F)

LCD_P40

10

(DP3/3C/3B/3A)

LCD_P42

11

(4D/4E/4G/4F)

LCD_P43

12

(COL/4C/4B/4A)

LCD_P44


Configure pin-14 as backplane assigned to COM2 as shown below:

image

Similarly for pin-15 assigned to COM-3

image

Similarly for COM0 connected to pin-59

image

COM-1 connected to pin-60 as backplane

image

And for remaining segment connection for pins assigned to (not as Backplane)

Pin-20, pin-24, pin-26, pin-27, pin-40, pin-42, pin-43, pin-44

image

image

image

image

image

image

image

image

Next we need to change the duty cycle of the segment LCD to be ¼ as shown below:

image

All the lcd configuration is now completed. We shall proceed to generate the corresponding code by clicking on the ‘generate code’ as shown below:

image

The tool generate code as shown below

image


We need to add the driver header file for slcd “s401m16kr.c” and “s401m16kr.h” inside the source folder:


These files can be found from location where you have installed KSDK 1.3.0 version

“C:\Freescale\KSDK_1.3.0\examples\frdmkl43zkl33z4\demo_apps\slcd_low_power_demo”


To add these files follow below steps:

image

image

Select the file location as mentioned and select the two files “s401m16kr.c” and “s401m16kr.h” in the check box as shown:

image

Now you can see these files are added in your project source folder as shown

image

Insert the Code:

Now its time to add our code to execute and test each segments of LCD


 

char seg[]={20,24,26,27,40,42,43,44}; // seven segment connection
  char col[]={0,1,2,3}; //column of lcd

  int s,c,i;

  //initialize and configuring the slcd settings we did in PE
  SLCD_DRV_Init(display1_IDX, &display1_InitConfig0);
  SLCD_DRV_SetAllPinsConfig(display1_IDX, &display1_PinsCfg);

  // setting of Backplane connected to com0-com3
  SLCD_DRV_SetBackPlanePhase(display1_IDX, 59, kSLCDPhaseA);
  SLCD_DRV_SetBackPlanePhase(display1_IDX, 60, kSLCDPhaseB);
  SLCD_DRV_SetBackPlanePhase(display1_IDX, 14, kSLCDPhaseC);
  SLCD_DRV_SetBackPlanePhase(display1_IDX, 15, kSLCDPhaseD);

// starting the slcd function
  SLCD_DRV_Start(display1_IDX);


  for(;;){
// to glow all the segment in order
for(s=0;s<=7;s++){
                           for(c=0;c<=4;c++){
                                      SLCD_WritePin(seg[s],col[c],1 );
                                      for(i=0;i<=2000000;i++); // delay for user to see the segment glowing
                                    }
 }
// to erase all the segment
for(s=0;s<=7;s++){
                                     for(c=0;c<=4;c++){
                                                 SLCD_WritePin(seg[s],col[c],0 );
                                     }
 }
for(i=0;i<=5000000;i++);       // small delay
 }  //end of for(;;)



Add these lines of code inside main as shown below

image

Now compile and build the project by clicking the hammer button as shown below:

image

You can see the build result in console window as shown below:

image

Now we will execute our code by debug method:

image

Next select the PEMicro debugging interface and OpenSDA type as shown below:

image

After clicking on debug the system launches our project and below window appears.

image

You will see a Debug execution window, press Resume button as shown below:

image


You can see the segments of LCD glows one-by-one as shown in the output video:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

I have enclosed the project folder and executable srec file for your reference:


Happy displaying slcd using KSDK1.3.0 ... image image image




Attachments:
SLCD Test-KL43Z-srec.rar
SLCD Test-KL43Z.rar
  • Sign in to reply
  • bheemarao
    bheemarao over 9 years ago in reply to bheemarao

    Hi Sankara,

     

    Below is my snapshot after installing KSDK1.3.0, you can see KSDK1.3.0 Eclipse update exists in my installation.

    image

    from your snap shot is seems KSDK1.3.0 is not installed nor Eclipse updated for KSDK1.3.0

    have you proceeded for step-2 i.e after installing KSDK1.3.0 you need to do Eclipse update by navigating to Help>Install New Software..

     

    Best Regards

    Bheema Rao

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 9 years ago

    Hi Bheema,

    I re-installed KDS 3.0 and tried to install KSDK 1.3 but again the same error i am getting. This is the snapshot from fresh installation. Can you find anything missing??image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bheemarao
    bheemarao over 9 years ago in reply to Former Member

    Hi Sankara,

     

    Please follow the below steps (assuming KDS3.0 is installed)

     

    Step-1: Download the KSDK 1.3.0 from below link: ("Kinetis SDK 1.3.0 Mainline - Windows.exe")

    https://freescale.flexnetoperations.com/control/frse/product?entitlementId=123812727&lineNum=1&authContactId=73533311&authPartyId=61860331

    install it in default folder i.e "C:\Freescale\KSDK_1.3.0"

     

    Note: if you are not able to install KSDK1.3.0 uninstall kds3.0 and reinstall KDS3.0 (download link given below) then again install KSDK1.3.0

    https://freescale.flexnetoperations.com/control/frse/product?entitlementId=123663777&lineNum=1&authContactId=73533311&au…

     

     

    Step-2: Eclipse Update


    Navigate to

    Select "Help" -> "Install New Software"

     

    image

    In the Install New Software dialog box, click the "Add" button in the upper right corner. Then, in the Add Repository dialog, select the "Archive" button.


    image

    In the Repository archive dialog box, browse the KSDK install directory folder and select the KSDK_1.3.0_Eclipse_Update.zip file.

    image

    Click "Open", and the "OK" button in the Add Repository dialog box. Then The KSDK update shows up in the list of the original Install dialogs. Check the box to the left of the KSDK Eclipse update and click the "Next" button in the lower right corner.

     

    Follow the remaining instructions to finish the installation of the update.

     

    Best Regards

    Bheema Rao

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 9 years ago

    Hi,

     

    I am getting this error when I try to install KSDK_1.3 , can you help me to solve this issue. I am able to install KSDK 1.2. Attached my installation snapshot also.image

     

    Cannot complete the install because one or more required items could not be found.

      Software being installed: KSDK 1.3.0 Eclipse Update 1.0.0.b150914 (com.freescale.processorexpert.kinetis-ksdk-1.3.0.sp.feature.group 1.0.0.b150914)

      Missing requirement: KSDK 1.3.0 Eclipse Update 1.0.0.b150914 (com.freescale.processorexpert.kinetis-ksdk-1.3.0.sp.feature.group 1.0.0.b150914) requires 'com.freescale.processorexpert.feature.core.kpsdk.feature.group [1.3.0,2.0.0)' but it could not be found

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 9 years ago

    Very good detailed post.

     

    Well done.

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube