help for c program in PIC16f877

Discussion in 'Programmer's Corner' started by haoyan, Apr 30, 2007.

  1. haoyan

    Thread Starter New Member

    Apr 26, 2007
    3
    0
    Now I have a question that to saving data into pic16f877 and after a while i can use a push button then reload the data and show on lcd. I don't know how to program this part in c code, is there anyone can help me.
     
  2. sirch

    New Member

    May 19, 2008
    5
    0
    Use DATA EEPROM of 16f877. Its very simple. Follow instructions from datasheet n u'll get it.
     
  3. sirch

    New Member

    May 19, 2008
    5
    0
    Reply if u can't
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Use the interrupt which is activated by a signal on a pin of the pic and then write in this interrupt the instructions you want. If you program in, as i do, read the C reference manual to see how you read and write to the EEPROM.
     
  5. dezmond

    New Member

    Sep 27, 2008
    3
    0
    Anyone has any idea how to write the coding for an function say... "inverse()" in c programming which will only invert or toggle the 4 lower significant bits (a0~a3) and leave the 4 most significant bits (a4~a7) unchanged?

    e.g.

    porta = 0bx01010000;

    and after the inverse function,

    porta = inverse(porta);

    so porta now is 0b01011111.

    any one have any ideas? I've got a headache busting my brains out on this problem...

    thanks in advance man...
     
Loading...