Jump to content

shayne@spectreengineering.com

EstablishedMember
  • Content Count

    6
  • Joined

  • Last visited

Everything posted by shayne@spectreengineering.com

  1. I would like to request support for the 16F145X family of devices. Is this a matter of creating an appropriate h-file that has the correct register mapping, or is it more challengint than that? Thanks, Shayne
  2. Thanks for the reply. I have been running the code on a 16F819 device. Just as a test, I built a board with a 16F689 and got the same results. I ran the code in the debugger and it seems to be OK, it just doesn't seem to run in hardware. I wonder if my circuit design is to blame, but I seem to get appropriate transitions on the pins when I monitor them with a scope. I'm at a loss... I thought perhaps I'd try writing a function in assembly to test the switch.
  3. Hi, I am trying to get digital input on a 16F688. I have tried both port A and port C, but can't seem to read digital input. My code is listed below. I am using port C3 as input, port C1 as output. BatMon.h has function prototypes only. #include <system.h> #include "BatMon.h" #pragma DATA _CONFIG, _FCMEN_OFF & _INTOSCIO & _WDT_OFF & _BOD_OFF & _CP_OFF volatile bit rtc @PORTC.3; // RA4 button void main() { HWInit(); for(;;) { lrtc = readSW0(); if(rtc == 1) ToggleRed(); delay_s(1); }//for(ever) }//main void HWInit(void) { adcon1 = 0x08; trisc = 0x08; }//HWInit void ToggleRed(void) { static char flag = 1; if(flag == 0) { flag = 1; set_bit(portc, 1); } else { flag = 0; clear_bit(portc, 1); }//if-then-else }//ToggleRed Does this code look OK? Is there anything anyone can see that is obviously wrong? Thanks, Shayne
  4. Hi, how does system.h know which device I am going to use? Do I need to #define anything? -Shayne
  5. Hi, is there some description somewhere of what the configuration flags that are defined in the various header files are for? Thanks, Shayne
  6. Hi, I'm somewhat new to PICs and BoostC (though not to microcontrollers), and I had a couple of questions. What devices are supported by the i2c_driver routines that are found in the BoostC installation? From the looks of it, I'm assuming the 16F8XX series? How different are the devices in that series from each other? I also have a question regarding debugging. I am using the ICSP features to program the devices in my circuit board. I have done that OK, blinking lights and so forth, but as I get into more complicated applications (such as I2C interfaces), I'd like to be able to step through my code, is that possible? What interface do I need to use for this? Are there emulators avialble that are compatible with BoostC? Thanks, Shayne Rich
×
×
  • Create New...