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

Error PIC 18F2450

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



Joined: 25 Oct 2010
Posts: 4

View user's profile Send private message

Error PIC 18F2450
PostPosted: Wed Oct 27, 2010 10:08 am     Reply with quote

I'm programmer using CCS 4.08XX and I get the example ex_usb_serial.h with PIC18F2450.
I try compile with this PIC and ok, but when I test with Proteus 7.2, it show me this mesage error: "write 0X08(8) to uniplemented memory adress 0x0401 does nothing" both with more 38 similar post.
So I programmer using PIC18F2550 and it's ok.
My question is: Why does this happen?
I need change anything?

Thanks.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Wed Oct 27, 2010 1:35 pm     Reply with quote

Requesting Proteus support is out of the scope of this forum.

Anyway I will give you some possible causes:
1) Some antivirus reacts blocking some actions of Proteus when it try to modify some configuration register, disable it temporary.
2) To simulate an USB application in Proteus, you need to instal the virtual USB drivers.
3) Use the USB Analizer tool in order to get the error detected. To activate the USB analyzer, do a pause in the simulation, right click on the MCU, entering the sub-menu and at the very end, choose "USB Analyzer"

Regards
barros_souza



Joined: 25 Oct 2010
Posts: 4

View user's profile Send private message

PostPosted: Wed Oct 27, 2010 6:24 pm     Reply with quote

Humberto,
Thanks for you reply
I understand what you said, but let me tell you what is happening.
When I use 18F2550 firmware, I can connect with pc, install driver and everything else. But if I change to 18F2450, nothing happens.
I can not find the problem.
I am using the Proteus because I've tried to write for PIC18F2450 and does not work (unknown device in the Windows).
Anyone know how to solve this problem?

Thanks.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Wed Oct 27, 2010 7:54 pm     Reply with quote

The main difference between both MCU's are in its RAM size, while the USB module is the same.
Open the file PIC18_usb.h and verify the line
#define USB_MAX_EP0_PACKET_LENGTH __
change the value max packet length to 8, due to limited RAM availability in PIC18F2450.
8 bytes as End Point 0 buffer size is enough for a CDC application type.

Regards
barros_souza



Joined: 25 Oct 2010
Posts: 4

View user's profile Send private message

PostPosted: Thu Oct 28, 2010 5:07 am     Reply with quote

Humberto,
I am using the version compiler 4.084 and the file pic18_usb.h already have this changes.
The interesting is that if I change the name file 18F2550.h to 18F2440.h I have the same error.
I think that this error are in the memory locations something.

I don't know what to do.
Do you have more anything else that may me help?
Ttelmah



Joined: 11 Mar 2010
Posts: 19328

View user's profile Send private message

PostPosted: Thu Oct 28, 2010 6:12 am     Reply with quote

Try adding:

#define USB_OPT_FOR_ROM FALSE

Before loading the USB drivers.

You will find you have very little ROM left for your code. However it should work.

Some time ago, I had to get some code going on the 2450, and it would not work until I did this. The USB code uses so much of the RAM by default, that you get problems without this (optimizing for less ROM (the default)), uses too much RAM....

Also, seriously, Proteus's USB emulation is not good. It will work with some chips and not others, so your problem might well just be with this. I don't 'bother' trying to test USB with their emulation. Use the analog emulation to look for problems with the support circuitry, and then go to the real chip, and a USB snooper. I have a number of 'real' projects out in use, that will not work under the emulation....

Best Wishes
barros_souza



Joined: 25 Oct 2010
Posts: 4

View user's profile Send private message

PostPosted: Thu Oct 28, 2010 1:13 pm     Reply with quote

Man I give up. I go try another compiler. This does not work for this microcontrol.
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