Jump to content

Myrmidon

Members
  • Content Count

    2
  • Joined

  • Last visited

Everything posted by Myrmidon

  1. Hello all. I'v read the help guides and i'm still a little unsure about some things. I'v migrated from a basic compiler and i generally use the pic16f627 for now. I have my test program ready, just led flashing to get used to the way sourceboost works. Still finding my way with C tho. My programmer can set the fuses at the end before burning onto chip. However, in my program, would i just type: #pragma DATA_CONFIG, _INTRC_OSC_NOCLK & _WDT_OFF & _PWRTE_OFF & _CP_OFF I have the choice of a 37khz timer or 4mhz, i was going for the 4mhz. I tried it in simulator but nothing, the debugger said something about the port a. I basically just copied the sticky led test but modified it, here it is in full. #include <system.h> #pragma CLOCK_FREQ 4000000 //clock at 4mhz //config fuses #pragma DATA_CONFIG, _INTRC_OSC_NOCLK & _WDT_OFF & _PWRTE_OFF & _CP_OFF void main () { trisb = 0; //port b is output while( 1 ) //loops forever {portb.0=1; //pin 0 high portb.1=0; //pin1 low portb.2=1; //pin2 high delay_ms( 1000 ); //pause for 1 second portb.1=1; //pin1 high portb.0=0; //low portb.2=0; //low } } Can anyone help me out? Cheers.
×
×
  • Create New...