473,378 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Embedded c program for to ON led after 2 sec OFF led in atmel at89s52 8051?

give quick suggestion
Jun 26 '14 #1
1 1226
donbock
2,426 Expert 2GB
The canonical 8051 has a Harvard Architecture (separate address spaces for data and instructions) plus a third address space for internal RAM and special function registers. Standard C presupposes a von Neumann Architecture (a single address space for everything). Thus, C compilers for 8051 processors typically have nonstandard extensions to bridge the gap. A specific and detailed answer to your question cannot be given without knowing the particular extensions used by your compiler.

Here are some questions about your embedded system. General answers are ok to begin with, no need yet for detailed code snippets.
  1. How is the LED turned on?
  2. How is the LED turned off?
  3. How is elapsed time measured?
  4. Is it acceptable to write a function that turns on the LEDs, waits for 2 seconds, and then turns off the LED? That is, is it acceptable that your embedded system doesn't do anything else while this function runs for 2 seconds?
Jun 26 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Erik Cato | last post by:
Hi group! I'm trying to create at strategy for writing software modules. I'm writing code for embedded systems but this is not significant for the solution. What I'm trying to do is construct...
16
by: Sohail | last post by:
Hi all, i am now to group this might be out of topic, if it is then please tell me where i should ask this question... At the time i am working on a project based on 8051, The project is so get...
13
by: webzila | last post by:
Hello, I have to write a program for an 8051 micro-controller using micro-C to monitor Switch 1 and if the switch in pushed the message "switch 1 pushed" should be displayed in the LCD. Also the...
0
by: Chris Stephens | last post by:
The Autumn 2005 issue of our Embedded Development Tools Newsletter is now available for downloading from our web site It includes information about...... GCC "out of the box" packages for PPC...
3
by: Martin Wells | last post by:
I'm doing an embedded systems college project this year. I making a portable device that will take input in the form of simple switches, and give output in the form of LED's. I haven't yet decided...
20
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
There are a few guarantees I exploit in the C Standard. For instance, I might write (unsigned)-1 to get the maximum value for an unsigned integer. Also, I might rely on things such as: ...
30
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
Let's say we had a simple function for returning the amount of days in a month: unsigned DaysInMonth(unsigned const month) { switch (month) { case 8: case 3: case 5:
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.