Embedded programming

clocking's Avatar, Join Date: Jun 2007
Ambitious contributor
This is the best technology now.
0
clocking's Avatar, Join Date: Jun 2007
Ambitious contributor
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.

Last edited by shabbir; 27Sep2007 at 21:21.. Reason: Code block
0
clocking's Avatar, Join Date: Jun 2007
Ambitious contributor
oh, you can research assembly for your skill in embedded programming. Especially interupters. It's very large and difficult.
0
DaWei's Avatar, Join Date: Dec 2006
Team Leader
Rambling, off-topic thread. Closed.