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

PIC16LF1823 bug in MPLAB or CCS?

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



Joined: 14 May 2010
Posts: 20

View user's profile Send private message

PIC16LF1823 bug in MPLAB or CCS?
PostPosted: Thu Aug 26, 2010 9:33 am     Reply with quote

Hello,
if I write a value to the EEPROM with write_EEPROM(x,y) I can read it by using y=read_EEPROM(x).

But if I write to EEPROM by using #ROM 0xF000={y} the value is not really written to EEPROM - even if MPLAB shows me with VIEW => EEPROM, that the value should be there. #ROM 0x2100 and so on did not work too and datasheet tells me, that 0xF000 should be O.K. Using this function never made problems with older PICs.
Even if I have a account at Microchip, it seems to be impossible to open a account at Microchip - support for me... maybe they have to much traffic????
Ttelmah



Joined: 11 Mar 2010
Posts: 19366

View user's profile Send private message

PostPosted: Thu Aug 26, 2010 10:10 am     Reply with quote

#rom getenv("EEPROM_ADDRESS") = { your data }

Saves you having to work out 'where' the EEPROM is. Smile

0xF000, should be right.

Best Wishes
buchtsucht



Joined: 14 May 2010
Posts: 20

View user's profile Send private message

PostPosted: Thu Aug 26, 2010 11:31 pm     Reply with quote

Thanks Ttelmah, that is a good idea, and I will use it in future, but it did not solve the problem. Adding 100pF to VDD should help sometimes, but has no success too.
Ttelmah



Joined: 11 Mar 2010
Posts: 19366

View user's profile Send private message

PostPosted: Fri Aug 27, 2010 1:59 am     Reply with quote

If adding 100pF to Vdd, is having any effect at all, it suggests you have a hardware supply problem. You should normally expect to have soemthing much larger (0.1uF typically) immediately adjacent to the PIC.

It is vital to understand, that even if you have a 'perfect' power supply (zero output impedance, and with instantaneous responses to demand changes), connected to your board, once you have a few inches of wire connecting to an IC, you _will_ need local decoupling to keep the supply 'smooth' at the chips, as their demand changes. Wires/tracks, have all sorts of 'nasty' characteristics (inductance, time delay - speed will be well below the velocity of light, etc.), which you _must_ deal with. If you study a high quality board like a typical PC motherboard, you have a very good PSU (normally), being generated to feed the electronics, and thick power tracks, yet there are decoupling capacitors all over the board. Remember that designers of such boards, want to save money, and such capacitors cost money. Theyy are there because they are _needed_...

Best Wishes
buchtsucht



Joined: 14 May 2010
Posts: 20

View user's profile Send private message

PostPosted: Fri Aug 27, 2010 3:07 am     Reply with quote

Found the solution:

In PIckit3 settings / Memory / manual select Memory ranges / EEPROM was not activated. Maybe this happens while changing the device.
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