Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pinguino C code
22-02-2014, 09:34 PM, (This post was last modified: 22-02-2014, 09:53 PM by ahmedebeed555.)
#1
Pinguino C code
Hello, I 'm new to Pinguino. Can I open C code for PIC18F4550 in Pinguino , compile and upload hex file ?
Reply
22-02-2014, 10:58 PM,
#2
RE: Pinguino C code
(22-02-2014, 09:34 PM)ahmedebeed555 Wrote: Hello, I 'm new to Pinguino. Can I open C code for PIC18F4550 in Pinguino , compile and upload hex file ?

Hello,
Would you attach an C code example you would like to compile and upload in your Pic18f4550 in order we could put it in a format acceptable by the Pinguino IDE and show you the way to follow ?
André
Reply
22-02-2014, 11:13 PM,
#3
RE: Pinguino C code
(22-02-2014, 10:58 PM)gtcbreizh Wrote:
(22-02-2014, 09:34 PM)ahmedebeed555 Wrote: Hello, I 'm new to Pinguino. Can I open C code for PIC18F4550 in Pinguino , compile and upload hex file ?

Hello,
Would you attach an C code example you would like to compile and upload in your Pic18f4550 in order we could put it in a format acceptable by the Pinguino IDE and show you the way to follow ?
André

Thank you for your reply. I attached a blink program in C that I 've tried before to be working and uploaded it using IcSP programmer.

Now , I want to upload it using Pinguino.

Is this possible ?


Attached Files
.c   blinkC.c (Size: 1.52 KB / Downloads: 12)
Reply
23-02-2014, 10:07 AM, (This post was last modified: 23-02-2014, 10:20 AM by gtcbreizh.)
#4
RE: Pinguino C code
(22-02-2014, 11:13 PM)ahmedebeed555 Wrote:
(22-02-2014, 10:58 PM)gtcbreizh Wrote:
(22-02-2014, 09:34 PM)ahmedebeed555 Wrote: Hello, I 'm new to Pinguino. Can I open C code for PIC18F4550 in Pinguino , compile and upload hex file ?

Hello,
Would you attach an C code example you would like to compile and upload in your Pic18f4550 in order we could put it in a format acceptable by the Pinguino IDE and show you the way to follow ?
André

Thank you for your reply. I attached a blink program in C that I 've tried before to be working and uploaded it using IcSP programmer.

Now , I want to upload it using Pinguino.

Is this possible ?

Would you use the Pinguino IDE and Library ? If yes, did you already install them ?
Would you use the Pinguino bootloader either V2.12 or V4.14 or would you simply use your board in ICSP mode ?
Did you look at the Wiki. There you could study several examples to understand the Pinguino philosophy very closed to the Arduino one.
Reply
23-02-2014, 11:11 AM,
#5
RE: Pinguino C code
Hello. I am using Pinguino IDE x4v959 and bootloader v4.14. And programmed some successful *.pde files and uploaded them and worked good.

I just wanted to open C code into Pinguino IDE and compile it then upload the Hex file using Pinguino IDE to Pinguino 18F4550 board.

Is this possible ?

Is this mentioned in the Wiki ?

If yes please send me the link to it.

Thank you all.
Reply
23-02-2014, 12:23 PM,
#6
RE: Pinguino C code
(23-02-2014, 11:11 AM)ahmedebeed555 Wrote: Hello. I am using Pinguino IDE x4v959 and bootloader v4.14. And programmed some successful *.pde files and uploaded them and worked good.

I just wanted to open C code into Pinguino IDE and compile it then upload the Hex file using Pinguino IDE to Pinguino 18F4550 board.

Is this possible ?

Is this mentioned in the Wiki ?

If yes please send me the link to it.

Thank you all.

You cannot directly compile a C code. You must at least put this in your program :

void setup() {
//run once:

}

void loop() {
//run repeatedly:

}
and complete like this (for your example) :
-----------------------------------------------------*/
/* *************** TIMER *************** */
void delayzz(void)
{ int i, j;
for(i=0;i<5000;i++)
{
for(j=0;j<2;j++)
{ /* Well its Just a Timer */ }
}
}



void setup() {
//run once:
TRISB = 0xF0 ; // PORT B Setting: Set all the pins B0 B1 B2 B3 to Output.

}

void loop() {
//run repeatedly:
LATBbits.LATB0 = 1; // RB-1 to High
LATBbits.LATB1 = 1; // RB-1 to High

delayzz();

LATBbits.LATB0 = 0; // RB-0 to LOW
LATBbits.LATB1 = 0; // RB-0 to LOW

delayzz();


}
Good luck
Reply
23-02-2014, 12:37 PM,
#7
RE: Pinguino C code
Thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)