SlidePub
Home
Categories
Login
Register
Home
Technology
introduction to ARM C programming language
introduction to ARM C programming language
PratikGohel3
54 views
25 slides
Sep 02, 2024
Slide
1
of 25
Previous
Next
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
About This Presentation
ARM C programming
Size:
10.09 MB
Language:
en
Added:
Sep 02, 2024
Slides:
25 pages
Slide Content
Slide 1
ARM C programming
Slide 2
#include "lpc214x.h" // Include LPC2148 header file #define LED_PIN 16 // Define LED to PIN 16 #define LED_PORT IO1PIN // Define LED to Port1 #define LED_DIR IO1DIR // Define Port1 direction register void delayMs (unsigned int x); int main() { PINSEL2 = 0x00000000; // Define port lines as GPIO LED_DIR |= (1 << LED_PIN); // Define LED pin as O/P LED_PORT &= ~(1 << LED_PIN); // Turn off the LED initially while(1) // Loop forever { LED_PORT |= (1 << LED_PIN); // Turn ON LED delayMs (1000); // 1 second delay LED_PORT &= ~(1 << LED_PIN); // Turn OFF LED delayMs (1000); // 1 second delay } return 0; } //Blocking delay function void delayMs (unsigned int x) { unsigned int j; for(;x>0;x--) for(j=0; j<0x1FFF; j++ ); }
Slide 3
#include <lpc214x.h> int main ( void ) { IO1DIR &= ~ ( 1 << 16 ) ; // explicitly making P1.16 as Input IO0DIR |= ( 1 << 10 ) ; // Configuring P0.10 as Output while ( 1 ) { if ( ! ( IO1PIN & ( 1 << 16 ))) // Evaluates to True for a 'LOW' on P1.16 { IO0CLR |= ( 1 << 10 ) ; // drive P0.30 LOW, turn LED ON } else { IO0SET |= ( 1 << 10 ) ; // drive P0.30 HIGH, turn LED OFF } } return 0; }
Tags
Categories
Technology
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
54
Slides
25
Age
457 days
Related Slideshows
11
8-top-ai-courses-for-customer-support-representatives-in-2025.pptx
JeroenErne2
48 views
10
7-essential-ai-courses-for-call-center-supervisors-in-2025.pptx
JeroenErne2
47 views
13
25-essential-ai-courses-for-user-support-specialists-in-2025.pptx
JeroenErne2
37 views
11
8-essential-ai-courses-for-insurance-customer-service-representatives-in-2025.pptx
JeroenErne2
34 views
21
Know for Certain
DaveSinNM
22 views
17
PPT OPD LES 3ertt4t4tqqqe23e3e3rq2qq232.pptx
novasedanayoga46
26 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-25)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better