SlideShare ist ein Scribd-Unternehmen logo
1 von 14
LED & Switch
Interface
using
TMS320C6745
https://www.pantechsolutions.net/products/dsp-
dsc-boards/tms320c6745-tyro
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Features of GPIO
The GPIO peripheral consists of the following
features
• Separate input/output registers
• All GPIO signals can be used as interrupt sources
• All GPIO signals can be used to generate events
to the EDMA.
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Led Connection to C6745
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
GPIO Registers
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
GPIO Address
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
GPIO Direction Registers (DIRn)
By default, all the GPIO pins are configured as inputs
(bit value = 1)
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
F 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
F F F F
0xF000FFFF
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
GPIO Output Data Registers
(OUT_DATAn)
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 F F F
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
0x0FFF0000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
0x00000000
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
STEPS FOR LED BLINKING
Declare two pointer variables for GPIO Direction register
and GPIO Data Register
Set Byte Address for GPIO Direction register and GPIO Data
Register
Configure GPIO as output in GPIO Direction Register
Configure Required Blinking data in GPIO Data Register
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Set Base Address
• gpio_dir01 = (Uint32 *)0x01E26010;
• gpio_out_data01 = (Uint32 *)0x01E26014;
Configure Direction register as Output
*gpio_dir01 = 0xF000FFFF;
Configure Data register as Output
*gpio_out_data01 = 0x0FFF0000;
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
DIP SWITCH INTERFACE
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
GPIO Input Data Registers (IN_DATAn)
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Program
#define Uint32 unsigned int
Uint32 Value,i;
void DelayMs(Uint32 Ms);
void main()
{
Uint32 *gpio_in_data01,*gpio_out_data01,*gpio_dir01;
gpio_in_data01 = (Uint32 *)0x01E26020;
gpio_dir01 = (Uint32 *)0x01E26010;
gpio_out_data01 = (Uint32 *)0x01E26014;
*gpio_dir01 = 0xF000FFFF;
while(1)
{
Value = *gpio_in_data01;
*gpio_out_data01 = Value<<16;
DelayMs(100);
}
}
void DelayMs(Uint32 Ms)
{
Uint32 i;
while(Ms>0)
{
for(i=0;i<30000;i++);
Ms--;
}
}
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
?
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
For more details
– www.pantechsolutions.net
– http://www.slideshare.net/pantechsolutions
– http://www.scribd.com/pantechsolutions
– http://www.youtube.com/pantechsolutions

Weitere ähnliche Inhalte

Was ist angesagt?

Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812
Pantech ProLabs India Pvt Ltd
 
Chapter 2 The 8088 Microprocessor
Chapter 2   The 8088 MicroprocessorChapter 2   The 8088 Microprocessor
Chapter 2 The 8088 Microprocessor
Dwight Sabio
 

Was ist angesagt? (20)

8086 instruction set
8086  instruction set8086  instruction set
8086 instruction set
 
PIC Introduction and explained in detailed
PIC Introduction and explained in detailedPIC Introduction and explained in detailed
PIC Introduction and explained in detailed
 
8259
82598259
8259
 
Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812
 
PIC Microcontrollers
PIC MicrocontrollersPIC Microcontrollers
PIC Microcontrollers
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
 
I/O Ports
I/O Ports I/O Ports
I/O Ports
 
Intel Pentium Pro
Intel Pentium ProIntel Pentium Pro
Intel Pentium Pro
 
Unit 3 Instruction of tms320C5x
Unit 3  Instruction of tms320C5xUnit 3  Instruction of tms320C5x
Unit 3 Instruction of tms320C5x
 
Embedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 CourseEmbedded System Programming on ARM Cortex M3 and M4 Course
Embedded System Programming on ARM Cortex M3 and M4 Course
 
Part-1 : Mastering microcontroller with embedded driver development
Part-1 : Mastering microcontroller with embedded driver development Part-1 : Mastering microcontroller with embedded driver development
Part-1 : Mastering microcontroller with embedded driver development
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacing
 
Chapter 2 The 8088 Microprocessor
Chapter 2   The 8088 MicroprocessorChapter 2   The 8088 Microprocessor
Chapter 2 The 8088 Microprocessor
 
Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
Introduction to MPLAB IDE
Introduction to MPLAB IDEIntroduction to MPLAB IDE
Introduction to MPLAB IDE
 
Ec8791 lpc2148 pwm
Ec8791 lpc2148 pwmEc8791 lpc2148 pwm
Ec8791 lpc2148 pwm
 
L8 understanding-atmega328 p-1
L8 understanding-atmega328 p-1L8 understanding-atmega328 p-1
L8 understanding-atmega328 p-1
 
8255 programming
8255 programming8255 programming
8255 programming
 

Andere mochten auch

Types of motors and control techniques using TI motor control kit
Types of motors and control techniques using TI motor control kitTypes of motors and control techniques using TI motor control kit
Types of motors and control techniques using TI motor control kit
Pantech ProLabs India Pvt Ltd
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
Dr.YNM
 

Andere mochten auch (16)

Interfacing UART with tms320C6745
Interfacing UART with tms320C6745Interfacing UART with tms320C6745
Interfacing UART with tms320C6745
 
Brainsense -Brain computer Interface
Brainsense -Brain computer InterfaceBrainsense -Brain computer Interface
Brainsense -Brain computer Interface
 
Basics of Connectors
Basics of ConnectorsBasics of Connectors
Basics of Connectors
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812
 
Median filter Implementation using TMS320C6745
Median filter Implementation using TMS320C6745Median filter Implementation using TMS320C6745
Median filter Implementation using TMS320C6745
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
Lcd module interface with xilinx software using verilog
Lcd module interface with xilinx software using verilogLcd module interface with xilinx software using verilog
Lcd module interface with xilinx software using verilog
 
Waveform Generation Using TMS320C6745 DSP
Waveform Generation Using TMS320C6745 DSPWaveform Generation Using TMS320C6745 DSP
Waveform Generation Using TMS320C6745 DSP
 
Introduction to tms320c6745 dsp
Introduction to tms320c6745 dspIntroduction to tms320c6745 dsp
Introduction to tms320c6745 dsp
 
Types of motors and control techniques using TI motor control kit
Types of motors and control techniques using TI motor control kitTypes of motors and control techniques using TI motor control kit
Types of motors and control techniques using TI motor control kit
 
Lcd
LcdLcd
Lcd
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
Medical Image Processing
Medical Image ProcessingMedical Image Processing
Medical Image Processing
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
Lcd interfacing
Lcd interfacingLcd interfacing
Lcd interfacing
 

Ähnlich wie Switch & LED using TMS320C6745 DSP

Easy steps fast result - tdm over ip configuration ad-net
Easy steps   fast result - tdm over ip configuration ad-netEasy steps   fast result - tdm over ip configuration ad-net
Easy steps fast result - tdm over ip configuration ad-net
rolands77
 

Ähnlich wie Switch & LED using TMS320C6745 DSP (20)

I made some more expansion board for M5Stack
I made some more expansion  board for M5StackI made some more expansion  board for M5Stack
I made some more expansion board for M5Stack
 
IRJET- Design and Implementation of PID Controller using HDL on FPGA
IRJET- 	  Design and Implementation of PID Controller using HDL on FPGAIRJET- 	  Design and Implementation of PID Controller using HDL on FPGA
IRJET- Design and Implementation of PID Controller using HDL on FPGA
 
Banana pi bpi-r1 user manual
Banana pi bpi-r1 user manualBanana pi bpi-r1 user manual
Banana pi bpi-r1 user manual
 
Raspberry-Pi GPIO
Raspberry-Pi GPIORaspberry-Pi GPIO
Raspberry-Pi GPIO
 
M3L Inc Company Profile (August 19th, 2020 version)
M3L Inc Company Profile (August 19th, 2020 version)M3L Inc Company Profile (August 19th, 2020 version)
M3L Inc Company Profile (August 19th, 2020 version)
 
Jorjin Technologies - AR Partnerships with Smart Glasses - 10012020
Jorjin Technologies -  AR Partnerships with Smart Glasses - 10012020Jorjin Technologies -  AR Partnerships with Smart Glasses - 10012020
Jorjin Technologies - AR Partnerships with Smart Glasses - 10012020
 
PPT+.pdf
PPT+.pdfPPT+.pdf
PPT+.pdf
 
An cm-303 8-bit-siso_sipo_piso_pipo_shift_registers
An cm-303 8-bit-siso_sipo_piso_pipo_shift_registersAn cm-303 8-bit-siso_sipo_piso_pipo_shift_registers
An cm-303 8-bit-siso_sipo_piso_pipo_shift_registers
 
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)
RASPBERRY PI WITH JAVA 8 + Pi4J (Devoxx 2014)
 
Coding with CircuitPython@CPB
Coding with CircuitPython@CPBCoding with CircuitPython@CPB
Coding with CircuitPython@CPB
 
Atomic pi Mini PC
Atomic pi Mini PCAtomic pi Mini PC
Atomic pi Mini PC
 
Atomic PI apug
Atomic PI apugAtomic PI apug
Atomic PI apug
 
Haiwei H8 4G WIFI+ Battery HDMI over ip encoder user manual
Haiwei H8 4G WIFI+ Battery HDMI over ip encoder  user manualHaiwei H8 4G WIFI+ Battery HDMI over ip encoder  user manual
Haiwei H8 4G WIFI+ Battery HDMI over ip encoder user manual
 
F9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets ledF9 microkernel app development part 2 gpio meets led
F9 microkernel app development part 2 gpio meets led
 
Company profile 2013.06
Company profile 2013.06Company profile 2013.06
Company profile 2013.06
 
Raspberry pi led blink
Raspberry pi led blinkRaspberry pi led blink
Raspberry pi led blink
 
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...
Kernel Recipes 2018 - New GPIO interface for linux user space - Bartosz Golas...
 
Zvika markfeld
Zvika markfeldZvika markfeld
Zvika markfeld
 
Top 4 multi brand diagnostic scan tools in diyobd2.fr
Top 4 multi brand diagnostic scan tools in diyobd2.frTop 4 multi brand diagnostic scan tools in diyobd2.fr
Top 4 multi brand diagnostic scan tools in diyobd2.fr
 
Easy steps fast result - tdm over ip configuration ad-net
Easy steps   fast result - tdm over ip configuration ad-netEasy steps   fast result - tdm over ip configuration ad-net
Easy steps fast result - tdm over ip configuration ad-net
 

Mehr von Pantech ProLabs India Pvt Ltd

Mehr von Pantech ProLabs India Pvt Ltd (20)

Registration process
Registration processRegistration process
Registration process
 
Choosing the right processor for embedded system design
Choosing the right processor for embedded system designChoosing the right processor for embedded system design
Choosing the right processor for embedded system design
 
Brain Computer Interface
Brain Computer InterfaceBrain Computer Interface
Brain Computer Interface
 
Electric Vehicle Design using Matlab
Electric Vehicle Design using MatlabElectric Vehicle Design using Matlab
Electric Vehicle Design using Matlab
 
Image processing application
Image processing applicationImage processing application
Image processing application
 
Internet of Things using Raspberry Pi
Internet of Things using Raspberry PiInternet of Things using Raspberry Pi
Internet of Things using Raspberry Pi
 
Internet of Things Using Arduino
Internet of Things Using ArduinoInternet of Things Using Arduino
Internet of Things Using Arduino
 
Brain controlled robot
Brain controlled robotBrain controlled robot
Brain controlled robot
 
Brain Computer Interface-Webinar
Brain Computer Interface-WebinarBrain Computer Interface-Webinar
Brain Computer Interface-Webinar
 
Development of Deep Learning Architecture
Development of Deep Learning ArchitectureDevelopment of Deep Learning Architecture
Development of Deep Learning Architecture
 
Future of AI
Future of AIFuture of AI
Future of AI
 
Gate driver design and inductance fabrication
Gate driver design and inductance fabricationGate driver design and inductance fabrication
Gate driver design and inductance fabrication
 
Brainsense -Introduction to brain computer interface
Brainsense -Introduction to brain computer interfaceBrainsense -Introduction to brain computer interface
Brainsense -Introduction to brain computer interface
 
Wearable Technology
Wearable TechnologyWearable Technology
Wearable Technology
 
MG3130 gesture recognition kit
MG3130 gesture recognition kitMG3130 gesture recognition kit
MG3130 gesture recognition kit
 
Introduction to Brain Computer Interface
Introduction to Brain Computer InterfaceIntroduction to Brain Computer Interface
Introduction to Brain Computer Interface
 
Arm tyro
Arm tyroArm tyro
Arm tyro
 
Building Robots Tutorial
Building Robots TutorialBuilding Robots Tutorial
Building Robots Tutorial
 
Introduction to robotics
Introduction to roboticsIntroduction to robotics
Introduction to robotics
 
Brainwave starter Kit- Brain computer interface
Brainwave starter Kit- Brain computer interfaceBrainwave starter Kit- Brain computer interface
Brainwave starter Kit- Brain computer interface
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Switch & LED using TMS320C6745 DSP

  • 2. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Features of GPIO The GPIO peripheral consists of the following features • Separate input/output registers • All GPIO signals can be used as interrupt sources • All GPIO signals can be used to generate events to the EDMA.
  • 3. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Led Connection to C6745
  • 4. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. GPIO Registers
  • 5. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. GPIO Address
  • 6. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. GPIO Direction Registers (DIRn) By default, all the GPIO pins are configured as inputs (bit value = 1) 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 F 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 F F F F 0xF000FFFF
  • 7. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. GPIO Output Data Registers (OUT_DATAn) 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 F F F 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x0FFF0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x00000000
  • 8. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. STEPS FOR LED BLINKING Declare two pointer variables for GPIO Direction register and GPIO Data Register Set Byte Address for GPIO Direction register and GPIO Data Register Configure GPIO as output in GPIO Direction Register Configure Required Blinking data in GPIO Data Register
  • 9. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Set Base Address • gpio_dir01 = (Uint32 *)0x01E26010; • gpio_out_data01 = (Uint32 *)0x01E26014; Configure Direction register as Output *gpio_dir01 = 0xF000FFFF; Configure Data register as Output *gpio_out_data01 = 0x0FFF0000;
  • 10. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. DIP SWITCH INTERFACE
  • 11. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. GPIO Input Data Registers (IN_DATAn)
  • 12. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Program #define Uint32 unsigned int Uint32 Value,i; void DelayMs(Uint32 Ms); void main() { Uint32 *gpio_in_data01,*gpio_out_data01,*gpio_dir01; gpio_in_data01 = (Uint32 *)0x01E26020; gpio_dir01 = (Uint32 *)0x01E26010; gpio_out_data01 = (Uint32 *)0x01E26014; *gpio_dir01 = 0xF000FFFF; while(1) { Value = *gpio_in_data01; *gpio_out_data01 = Value<<16; DelayMs(100); } } void DelayMs(Uint32 Ms) { Uint32 i; while(Ms>0) { for(i=0;i<30000;i++); Ms--; } }
  • 13. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. ?
  • 14. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. For more details – www.pantechsolutions.net – http://www.slideshare.net/pantechsolutions – http://www.scribd.com/pantechsolutions – http://www.youtube.com/pantechsolutions