Author |
Topic |
|
Lainus
6 Posts |
Posted - 03/05/2010 : 09:50:40
|
Hello,
I have used a 18LF1330 with ICSP.
For burn, I have tried with 18F1320, and the burn is correct, but the program doesn't run.
The program is very simple and write with CCS. With Proteus ISIS, run correctly.
Please, can you help please?
Thank you |
|
Reply #1
Lainus
6 Posts |
Posted - 03/05/2010 : 10:46:28
|
#include <18f1330.h> #FUSES INTRC_IO,NOWDT,NOPUT,NOMCLR,NOBROWNOUT,NOPROTECT,NODEBUG,NOFCMEN,NOIESO #use delay(Internal=4M)
#use standard_io (a) #use standard_io (b)
void main() {
///Configuració pinout // set portc 0=sortida 1=entrada set_tris_a(0b01111010); // set portA configuració pinout set_tris_b(0b00001100); // set portB configuració pinout
output_high (PIN_B1); output_high (PIN_B5); //////////////////////////////bucle infinit........... While(true){ output_high (PIN_A0); delay_ms (500); output_low (PIN_A0); delay_ms(500);
if (input (pin_a5)){ output_high (PIN_B4); } else{ output_low (PIN_B4); }
} } |
|
|
Reply #2
Lainus
6 Posts |
|
|
Topic |
|
|
|