Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Embedded programming (http://www.go4expert.com/forums/embedded-programming-t6565/)

clocking 27Sep2007 19:23

Embedded programming
 
This is the best technology now. :D

clocking 27Sep2007 19:37

Re: Embedded programming
 
Right, now you can see the code:
Code: C

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

clocking 30Sep2007 14:31

Re: Embedded programming
 
oh, you can research assembly for your skill in embedded programming. Especially interupters. It's very large and difficult.

DaWei 30Sep2007 19:12

Re: Embedded programming
 
Rambling, off-topic thread. Closed.


All times are GMT +5.5. The time now is 21:44.