Jump to content


  • Content Count

  • Joined

  • Last visited


Community Reputation

0 Neutral

About Greg

  • Rank
  1. Hi, I would like to do this: if((shortA+shortB)>0xFFFF) { shortA++; } but the compiler tells me it is too complicated as they are 16 bit variables, could anyone help me by giving me an example of how i could do it differently? Thanks Greg
  2. Hi, I am writing some code using the PIC16f877 and comunication with another chip, and printf is printing to the serial line. I call this function ioRead twice within the program first time it runs fine and the second time as soon as it gets to the "clear_bit(PORTC,IOR);" bit it stops, it doesnt execute this, it just stops running then resets to the begining of the program, why does this happen? here is a snippet of the code: char ioRead(char addr) { // set data bus to input TRISB=0xff; // set the address to the specified address PORTA=addr; printf("Ports initialised now set chipsel\n
  3. Hi, I am using c2c c compiler and am trying to work out how i can pass the contents of say register PORTB to the serial line? ie using putchar. any help much appreciated, thanks in advance Greg
  • Create New...