SlideShare a Scribd company logo
1 of 15
Blinking LED
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.
Program
#define Uint32 unsigned int
void DelayMs(Uint32 Ms);
void main()
{
Uint32 *gpio_dir01,*gpio_out_data01;
gpio_dir01 = (Uint32 *)0x01E26010;
gpio_out_data01 = (Uint32 *)0x01E26014;
*gpio_dir01 = 0xF000FFFF;
while(1)
{
*gpio_out_data01 = 0x0FFF0000;
DelayMs(100);
*gpio_out_data01 = 0x00000000;
DelayMs(100);
}
}
void DelayMs(Uint32 Ms)
{
Uint32 i;
while(Ms>0)
{
for(i=0;i<300000;i++);
Ms--;
}
}
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

More Related Content

What's hot

Interfacing methods of microcontroller
Interfacing methods of microcontrollerInterfacing methods of microcontroller
Interfacing methods of microcontroller
Diwaker Pant
 

What's hot (20)

Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
 
Prototyping Embedded Devices_Internet of Things
Prototyping Embedded Devices_Internet of ThingsPrototyping Embedded Devices_Internet of Things
Prototyping Embedded Devices_Internet of Things
 
time hopping spread spectrum term paper
time hopping spread spectrum term papertime hopping spread spectrum term paper
time hopping spread spectrum term paper
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
 
Embedded c
Embedded cEmbedded c
Embedded c
 
Arduino & NodeMcu
Arduino & NodeMcuArduino & NodeMcu
Arduino & NodeMcu
 
OFDMA MATLAB CODE.pdf
OFDMA MATLAB CODE.pdfOFDMA MATLAB CODE.pdf
OFDMA MATLAB CODE.pdf
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
 
Ec8352 signals and systems 2 marks with answers
Ec8352 signals and systems   2 marks with answersEc8352 signals and systems   2 marks with answers
Ec8352 signals and systems 2 marks with answers
 
Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptx
 
Arduino IoT (shared)
Arduino IoT (shared)Arduino IoT (shared)
Arduino IoT (shared)
 
Interfacing methods of microcontroller
Interfacing methods of microcontrollerInterfacing methods of microcontroller
Interfacing methods of microcontroller
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
 
Introduction to dsp
Introduction to dspIntroduction to dsp
Introduction to dsp
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 

Viewers also liked

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
 
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
 

Viewers also liked (10)

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
 
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
 
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
 
Brainsense -Brain computer Interface
Brainsense -Brain computer InterfaceBrainsense -Brain computer Interface
Brainsense -Brain computer Interface
 
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
 
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
 

Similar to Led blinking using TMS320C6745

Similar to Led blinking using TMS320C6745 (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
 
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
 
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
 
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
 
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)
 
PPT+.pdf
PPT+.pdfPPT+.pdf
PPT+.pdf
 
Banana pi bpi-r1 user manual
Banana pi bpi-r1 user manualBanana pi bpi-r1 user manual
Banana pi bpi-r1 user manual
 
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
 
Coding with CircuitPython@CPB
Coding with CircuitPython@CPBCoding with CircuitPython@CPB
Coding with CircuitPython@CPB
 
Raspberry-Pi GPIO
Raspberry-Pi GPIORaspberry-Pi GPIO
Raspberry-Pi GPIO
 
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
 
Raspberry pi led blink
Raspberry pi led blinkRaspberry pi led blink
Raspberry pi led blink
 
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
 
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...
 
Company profile 2013.06
Company profile 2013.06Company profile 2013.06
Company profile 2013.06
 
Interfacing two wire adc0831 to raspberry pi2 / Pi3
Interfacing two wire adc0831 to raspberry pi2 / Pi3Interfacing two wire adc0831 to raspberry pi2 / Pi3
Interfacing two wire adc0831 to raspberry pi2 / Pi3
 
ZiLOG Universal Infrared Remote Reference Design
ZiLOG Universal Infrared Remote Reference DesignZiLOG Universal Infrared Remote Reference Design
ZiLOG Universal Infrared Remote Reference Design
 
KEDACOM - Recognitive IP video solutions
KEDACOM - Recognitive IP video solutionsKEDACOM - Recognitive IP video solutions
KEDACOM - Recognitive IP video solutions
 
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)
 

More from Pantech ProLabs India Pvt Ltd

More from 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
 
Median filter Implementation using TMS320C6745
Median filter Implementation using TMS320C6745Median filter Implementation using TMS320C6745
Median filter Implementation using TMS320C6745
 
Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4
 
Waveform Generation Using TMS320C6745 DSP
Waveform Generation Using TMS320C6745 DSPWaveform Generation Using TMS320C6745 DSP
Waveform Generation Using TMS320C6745 DSP
 
Interfacing UART with tms320C6745
Interfacing UART with tms320C6745Interfacing UART with tms320C6745
Interfacing UART with tms320C6745
 
Introduction to tms320c6745 dsp
Introduction to tms320c6745 dspIntroduction to tms320c6745 dsp
Introduction to tms320c6745 dsp
 
Brainsense -Introduction to brain computer interface
Brainsense -Introduction to brain computer interfaceBrainsense -Introduction to brain computer interface
Brainsense -Introduction to brain computer interface
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
Wearable Technology
Wearable TechnologyWearable Technology
Wearable Technology
 

Recently uploaded

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.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)
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
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
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 

Led blinking using TMS320C6745

  • 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. Program #define Uint32 unsigned int void DelayMs(Uint32 Ms); void main() { Uint32 *gpio_dir01,*gpio_out_data01; gpio_dir01 = (Uint32 *)0x01E26010; gpio_out_data01 = (Uint32 *)0x01E26014; *gpio_dir01 = 0xF000FFFF; while(1) { *gpio_out_data01 = 0x0FFF0000; DelayMs(100); *gpio_out_data01 = 0x00000000; DelayMs(100); } } void DelayMs(Uint32 Ms) { Uint32 i; while(Ms>0) { for(i=0;i<300000;i++); Ms--; } }
  • 11. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. DIP SWITCH INTERFACE
  • 12. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. GPIO Input Data Registers (IN_DATAn)
  • 13. 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--; } }
  • 14. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. ?
  • 15. 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