Quote Originally Posted by MERLIM View Post
Hello every body: I just joint the forum. Switching now slowly over from Basic Stamp 2 to the pick micro. I have Basic pro Gold . I have programmed some 12f683 successful. However I started now with the pic 16f688 because I needed more I/O. And it has the same programming pin configuration then the 12f683 which fits my Omega prototyping board. My Problem is: Con fig file. Or addressing the pins correctly. Or both. Especial I don’t know if using eight. $00000000 is OK because it is not working. I understand port A and port B have only 6 Ports. This is my code:
Code:
#CONFIG     ifdef PM_USED         device  pic16F688, intrc_osc_noclkout, wdt_on, mclr_on, protect_off
     else         __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
     endif
 #ENDCONFIG
 ansel=0      'set i/o to digital
 cmcon0 = 7   'comparator off 
 TRISC=%000001 ' set PortC RC5-RC1 to ‘outputs, RC0 input
 PORTC=%000010 ' Set PortC RC1 high to turn ‘on LED1

  Main:                 ' *** Test the switch state ***
  if portC.0 = 0 then led2     'If switch is pressed then  ‘jump to LED2 routine
  PortC.1 = 1                   ' Turn LED1 on
  portC.2 = 0                   ' Turn LED2 off
  goto Main                     ' Jump to the top of the main loop 
  LED2:                '*** Turn LED2 on ***
  portC.2 = 1                   ' LED2 on
  portC.1 = 0                   ' LED1 off
  goto Main                     ' Jump to the top of the main
This the way to display you code