Hi George,

> now i am using sdcc for programming pic16f84a.i want to know from
> where i get the  built in functions(functions for reading data from  a
> port and writing to a port ,delay  etc) in sdcc (means documentation
> of all the functions) and also some sample programs for pic16f84 

The pic14 library is close to non-existent, there are nearly no built-in
functions available from the SDCC/pic14 distribution alone.
You may try to use library sources from the device/lib tree, but for
your needs, you will just have to write your own routines: output to a
port should be a mere
  PORTA=0x42;
input similarly via
  char c;
  c = PORTA;

Delay routines will probably better be written in pure or inline
assembly similar to

#include <pic14regs.h>
#define NOP _asm nop _endasm

void delay_ms(unsigned ms) {
    unsigned j; // unsigned char might suffice?
    while (ms--) {
      for (j=0x42; j; j--) { NOP: }
    }
}

with 0x42 being replaced by a saner value, depending on the length of
the inner loop (number of instructions) and frequency of your device.

There might also be some code floating around on the web, but I have no
clue about that. Other may be able to help you out.

-- 

Regards,
Raphael Neider



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to