1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Embedded programming

Discussion in 'C' started by clocking, Sep 27, 2007.

Thread Status:
Not open for further replies.
  1. clocking

    clocking New Member

    Joined:
    Jun 12, 2007
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    0
    This is the best technology now. :D
     
  2. clocking

    clocking New Member

    Joined:
    Jun 12, 2007
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    0
    Right, now you can see the code:
    Code:
    //time waste function, to wait time given sleeptime[ms]
    void sleep(int sleeptime)
    {
        int i,j;
        for (i = 0;i < sleeptime; i++)
       {    
           for (j = 0;j < 20000; j++)
       }
    }
    
    int main( void) {
      int a,row;
      unsigned char k;
      PB.DDR = 0xff;
      P4.DDR = 0xff;
      while (1){
        a = 0x80;
        for (row = 0;row < 8;row ++){
           P4.DR.BYTE = a;
           PB.DR.BYTE = ~(ascii['A'][row]);
          sleep(1);
          a >>=1;
        }
       return 0;
    }
    
    There's the code to design for the KID (8*8)
    Seem very easy, but it's more difficult. because you should understand about Interupt.
     
    Last edited by a moderator: Sep 27, 2007
  3. clocking

    clocking New Member

    Joined:
    Jun 12, 2007
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    0
    oh, you can research assembly for your skill in embedded programming. Especially interupters. It's very large and difficult.
     
  4. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    Rambling, off-topic thread. Closed.
     
Thread Status:
Not open for further replies.

Share This Page