View previous topic :: View next topic |
Author |
Message |
love_hina Guest
|
re re |
Posted: Wed Aug 04, 2004 10:16 pm |
|
|
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 |
Posted: Wed Aug 04, 2004 10:18 pm |
|
|
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 |
Posted: Thu Aug 05, 2004 4:35 am |
|
|
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
|
|
Posted: Thu Aug 05, 2004 6:20 am |
|
|
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 |
Posted: Fri Aug 06, 2004 2:46 am |
|
|
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... |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1912 Location: Norman, OK
|
|
Posted: Fri Aug 06, 2004 8:50 am |
|
|
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
|
|
Posted: Fri Aug 06, 2004 10:46 am |
|
|
If he/she doesn't even know what compiler they are using, then I agree with dyeatman's eariler comment. |
|
|
|