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

Using a 18F4550 instead of 18F452

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
OE8PCK



Joined: 19 Apr 2009
Posts: 14
Location: Klagenfurt, AUSTRIA

View user's profile Send private message

Using a 18F4550 instead of 18F452
PostPosted: Wed Apr 29, 2009 2:22 am     Reply with quote

Firstly I don't really know if this is a problem that can be EASILY solved on a forum.
I will explain what I want to do and then see if anyone is willing to look into it and what information they need.
The program , which runs completely well on a 18F452 is design to read voltages which come from a HF receiver and then display them on an 16x2 LCD. There is also a menu system which can be accessed using a function button and three other button which are placed under the LCD and are used to change the display and also calibrate the program. Smile

Now I have changed the program by changing the PIC from 18f452 to 18f4550 and adding NOXINST to the fuses. The code compiles successfully and I then programmed the chip. Now the chip runs, but when I try to push the function button no display is shown on the LCD. Sad
I do not even know where to start looking since I am complete beginner. Embarassed
I want to use the 4550 because of the USB function that I intend to include in the program.
The program is very big (1143 lines, plus smaller subprograms) and therefore unsuitable for the message body so I would have to send it in another way if anybody responds.
If this is not something for a forum please tell me and I am sorry. Rolling Eyes

Regards, Paul OE8PCK



Regards,
Paul OE8PCK
Ttelmah
Guest







PostPosted: Wed Apr 29, 2009 2:29 am     Reply with quote

The first thing to look at, is 'what pins are being used'.
The 4550, doesn't have a port C3 pin, since the connection for this, is used for the USB voltage regulator. If the existing hardware, has a connection to pin 18, then it is not going to work on a 4550, without hardware changes.
If there is no connection to this pin, then it probably can be made to work (though bng able to use USB, will also require pins 23, and pins 24, to not be currently 'in use'). The other things that are likely to need changes, are some of the initialisation fuses. In particluar, the settings for peripherals that can be switched to other pins (like CCP1), and the extra ADC pins.
You need to work out what pins are actually being used on the 452, and what peripherals. You then have a chance of making the conversion...

Best Wishes
OE8PCK



Joined: 19 Apr 2009
Posts: 14
Location: Klagenfurt, AUSTRIA

View user's profile Send private message

PostPosted: Wed Apr 29, 2009 3:01 am     Reply with quote

Thanks very much for the useful information. All is now clear. The pins you mentioned are all used with the software, changing them would be like writing everything new. Sad
You have really helped me not to run the wrong way. Very Happy

Regards Paul OE8PCK
libor



Joined: 14 Dec 2004
Posts: 288
Location: Hungary

View user's profile Send private message

PostPosted: Wed Apr 29, 2009 3:18 am     Reply with quote

OE8PCK wrote:
The pins you mentioned are all used with the software, changing them would be like writing everything new.

not at all ! changing a pin is usually as easy as redefining one-two lines (usually a #define instruction in the beginning of the code) or (the worst case scenario unless there are some direct port bit-mask operations) changing all instances of PIN_C3 to PIN_B5 (whatever) in the code. ...this also can be done with a Find&Replace in 0.0001 sec with the editor.
You should however look if any special features are used of the processor (internal pull-up, external interrupt, timer input, comparator, analog input, SPI/I2C/USART port, etc.) tied to a particular pin, these pins cannot be changed that easily if these hardware features are used by the application.

...adding USB functionality to an existing application (written by somebody else) is however not the very best 'tutorial' suited for an absolute beginner, I think. Wink
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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