Jump to content
Sign in to follow this  
Koen Schmitz

asm config word

Recommended Posts

Dear All,

 

First sorry for so many stupid questions but I am a newbie.

Question how can set the config word in C instead of in the pic programmer, my little (first) program in C is working but  asm_config etc. is generated a error(108) illegal character (0)  although I Copy it from a example program fcounter.c.

Help will be highly appreciated

 

With kind Regards

Koen

My program:

 

#include

#pragma CLOCK_FREQ 4000000

 

asm _CONFIG _CP_OFF _WDT_OFF _XT_OSC _PWRTE_ON

main()

{

   

 

set_bit( STATUS, RP0 );

set_tris_b(0x00);

set_tris_a(0x00);

clear_bit( STATUS, RP0 );

 

 output_port_b( 0x00 );

 output_port_a( 0x00 );

 

 

 

   while( 1 )

   {

    set_bit(PORTA,0);

    delay_ms(1);

    clear_bit(PORTA,0);

    delay_ms(1);

   }

 

   

} :)

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...