Oops.. I forgot this other one ... else if ( RA4 = 0 & SLEEPING) should it be if ((RA4 == 0) && SLEEPING) { RD1 = 1 ; RD0 = 1 ; SLEEPING = 0 ; } ... Regards Gaston Gagnon wrote: > Hi Ed, > > In the main() fonction, you may want > if(RA4 == 0) instead of if(RA4 = 0) > Is RA4 an open collector on that PIC? If so do you have a pull-up resistor ? > > Hope this helps. > Gaston > > Ed Troy wrote: > > > I have a very simple application for a pic 16c74b. (Yes, I know it is gross > > overkill, but that is what we are using.) Basically, it is being used to > > program two National Semiconductor synthesizers. They use the standard SPI > > bus, which has a data, a clock, and an enable line. I am using (or at least > > trying to use) RC5 for data, RC3 for clock, and RC2 for low synthesizer > > enable and RC1 for high synthesizer enable. The code seems to do nothing at > > all, in either MPLAB or on the actual board. Basically, nothing toggles or > > does ANYTHING! I am sure I am doing something incredibly stupid, or lacking > > some very simple line of code to set something up, but I can't figure out > > the problem at all. I am attaching a copy of the c code (I used a Hi-Tech > > compiler), but I don't believe there is anything non-standard in the code, > > and the actual hex code that was generated by the Hi-Tech compiler. The > > only error messages I get are not errors but warnings indicating math > > overflow in lines 85, 90, 110, 115, which are SSPBUF=R_RX_LOW, > > SSPBUF=N_RX_LOW, SSPBUF=R_RX_HIGH, and SSPBUF=N_RX_HIGH. It seems > > especially unusual that it gives warnings for those lines, but not other > > lines where SSPBUF is set, which are essentially equivalent. > > > > Any help on where my problem is would be greatly appreciated. As I said, > > this is very simple, and the fact that nothing happens tells me that I am > > just overlooking something very simple. > > > > TIA, > > Ed > > > > ------------------------------------------------------------------------ > > > > TEST3.HEXName: TEST3.HEX > > Type: Plain Text (text/plain) > > > > TEST3.CName: TEST3.C > > Type: Plain Text (text/plain) > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu