Servo code into PIC18F4431

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Servo code into PIC18F4431

Postby Han Giap » Sat Apr 10, 2010 11:35 pm

Hi,

i would like to know...

can i burn the cytron provided source code for PIC16F877, single servo 18F877 20 MHz..

into a PIC18F4431?

// configuration
//==========================================================================
__CONFIG ( 0x3F32 ); //configuration for the microcontroller

this configuration is only for 877?

thanks
Han Giap
Novice
 
Posts: 20
Joined: Thu Mar 25, 2010 7:36 pm

Re: Servo code into PIC18F4431

Postby shahrul » Sun Apr 11, 2010 2:20 pm

Han Giap WROTE:Hi,

i would like to know...

can i burn the cytron provided source code for PIC16F877, single servo 18F877 20 MHz..

into a PIC18F4431?

// configuration
//==========================================================================
__CONFIG ( 0x3F32 ); //configuration for the microcontroller

this configuration is only for 877?

thanks

This is for PIC16F877A, using Hi-Tech PIC16. When using PIC18, it using different compiler, that is Hi-Tech PIC18. The configuration is different. You may refer to that PIC datasheet and Hi-Tech manual.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: Servo code into PIC18F4431

Postby ober » Mon Apr 12, 2010 9:25 am

Yes, shahrul is correct. The sample source code from Cytron is using Hi-TECH C compiler for Base-line and Mid-Range, which cover from PIC10 to PIC16, but not PIC18. Still you can use the code for PIC18, but you will need to do modification based on the compiler you are using.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 7 guests

cron