Thread: Design of a project

  1. #1
    Registered User
    Join Date
    Apr 2019
    Posts
    25

    Design of a project

    I am referring to a micro controller based embedded C programming. Most of the time the processor i am working with has very limited time, where the number of tasks are more, for example
    a. Analog data reading of several channels.
    b. UART transmission.
    c. Timer interrupts.
    d. LCD display.

    So, i need to keep a close watch on the timing that it does not overrun. Once the data is ready in the ADC i need to read it in the main etc. So, it is becoming extremely difficult to keep track of any issue if i overwrite the code.

    Now my question before i start programming i want to create a design of all the functions, the variables where it shall be enabled and where it shall be disabled after read operation etc.
    What are the tools i can use to make my design easy, even if i make a mistake i can identify the bug.
    Please help.

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,119
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,076
    > Most of the time the processor i am working with has very limited time
    Which one?

    Are you working with other more capable micro controllers the rest of the time?

    > a. Analog data reading of several channels.
    How many channels?
    Are all the analog inputs wired directly to the C, or are they multiplexed somehow with some external switching hardware.
    Have you read your C data sheet to see how long it takes to convert one sample?
    Do you have to poll for the result of a conversion, or can the ADC generate an interrupt when the conversion is done?

    > b. UART transmission.
    Transmitting what information, how often, at what baud rate?
    Do you have a UART controller on the C (where all you need to do is write characters), or are you expected to bit-bang 0|1 on a single wire.

    c. Timer interrupts.
    What are you timing?
    How often are the interrupts going off?

    d. LCD display.
    What do you want to display?
    How often is the display updated?
    Do you have an LCD controller on the C (where all you need to do is write characters), or are you expected to bit-bang 0|1 on a single wire.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 05-01-2015, 09:44 AM
  2. Replies: 0
    Last Post: 05-01-2015, 09:44 AM
  3. New Project, text game, design stage.
    By Shamino in forum Game Programming
    Replies: 9
    Last Post: 05-23-2007, 06:39 AM
  4. Help me design a class project!
    By codegirl in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 03-17-2004, 08:19 PM
  5. problems in with design of a server project.
    By codec in forum C++ Programming
    Replies: 4
    Last Post: 02-28-2003, 09:11 AM

Tags for this Thread