CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

i need help on LED programming
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
love_hina
Guest







re re
PostPosted: Wed Aug 04, 2004 10:16 pm     Reply with quote

i think i will connect the LEDs to port B..i'm think of leaving out one LED if it is hard to program...
what kind of programmer?? what do u mean??i'm sorry i dun understan...
MPLAB IDE?? v6.4???
Guest








Re: re re
PostPosted: Wed Aug 04, 2004 10:18 pm     Reply with quote

love_hina wrote:
i think i will connect the LEDs to port B..i'm think of leaving out one LED if it is hard to program...
what kind of programmer?? what do u mean??i'm sorry i dun understan...
MPLAB IDE?? v6.4???


Someone has posted a schematics as a guide on your experiment...
jak
Guest







example code
PostPosted: Thu Aug 05, 2004 4:35 am     Reply with quote

Code:

/*
    Port B---->|LED|---|R330|-----GND
*/
#include    <18F252.h>
#fuses      XT,NOWDT,NOPROTECT
#use        delay(clock=20000000)
#use        rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
#include    <input.c>

//-------------------------------------------
#int_rda
void blink_led(){
   byte value;
     value=getc();
  disable_interrupts(int_rda);
 
   if(value=='1'){
   output_high(pin_b0);
      delay_ms(1000);
   output_low(pin_b0);
      delay_ms(1000);
   }
}
main() {
  enable_interrupts(int_rda);
    enable_interrupts(global);
   while (TRUE);

}
dyeatman



Joined: 06 Sep 2003
Posts: 1912
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Aug 05, 2004 6:20 am     Reply with quote

Do you remove the chip from the board to program it (load the program into it) then put it back in the board or program it without removing it from the board?

MPLab is not a compiler it is a development environment. I was asking for the version of the CCS C Compiler.

To display the version run the CCS compiler (Ccsc.exe) from a command line with the +V switch (page 3 of the CCS manual).
love_hina84
Guest







re
PostPosted: Fri Aug 06, 2004 2:46 am     Reply with quote

the pic18f252 is already soldered onto the board. i will download it in thru RJ45 via the MPLAB link... CCS?? if i'm wrong is c18.. i not very sure about compiler or environment developer..i only know i have to use it... Crying or Very sad
dyeatman



Joined: 06 Sep 2003
Posts: 1912
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Aug 06, 2004 8:50 am     Reply with quote

If you are using the C18 compiler you are on the wrong board and we cannot help you. None of the examples we gave you are going to compile....

You need to go to the Microchip website forum at:

http://forum.microchip.com

Please go there to get assistance from this point.

Good Luck!
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Aug 06, 2004 10:46 am     Reply with quote

If he/she doesn't even know what compiler they are using, then I agree with dyeatman's eariler comment. Wink
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group