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

HELP!!! pic18f2520 rev.1 and rev6 SPI differences

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



Joined: 20 Feb 2008
Posts: 27
Location: mexico

View user's profile Send private message MSN Messenger

HELP!!! pic18f2520 rev.1 and rev6 SPI differences
PostPosted: Fri Nov 21, 2008 11:10 am     Reply with quote

Hi,

I am having problems with the pic18f2520. I have complete my program for rev1 but when I change the pic for a rev6 then the SPI from slave to master is sending garbage.

What is the difference and how could I work around?


Errata File for Rev6
http://ww1.microchip.com/downloads/en/DeviceDoc/80304c.pdf
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Nov 21, 2008 4:23 pm     Reply with quote

Is the 18F2520 used for the SPI slave or the master (or both) ?

Which one (slave or master) is using the Rev. 6 silicon ?
temopic



Joined: 20 Feb 2008
Posts: 27
Location: mexico

View user's profile Send private message MSN Messenger

PostPosted: Mon Nov 24, 2008 8:29 am     Reply with quote

Quote:
Is the 18F2520 used for the SPI slave or the master (or both) ?


Both
Quote:
Which one (slave or master) is using the Rev. 6 silicon ?

1.-Rev1 for Master and Slave=Both works fine
2.-Rev1 for Master and Rev6 for Slave = Slave send garbage to Master
3.-Rev6 for Master and Rev1 for Slave = Works fine
4.-Rev6 for Master and Rev6 for Slave = Slave send garbage to Master

Cant make the Slave Rev6 works fine
Ttelmah
Guest







PostPosted: Mon Nov 24, 2008 9:47 am     Reply with quote

Are you using the slave select?. Your fault is appearing on rev6, slave only, and the only erratum for the slave, is with the slave select operation.
If so, you will need to consider if you can work without using the select, since this fault has no known 'fix'.
If you need to use select, then consider not using the hardware SS _from the master_, but dropping the slave select yourself, then waiting a moment (just a single NOP), then sending your clocks. Turn off slave select operation, in the master code, and operate it manually. You will need to wait for the transmission to complete, then deselect this line.
If you are not using slave select, then also look at other errata sheets for 'close' family members. Not all faults are known, and you may have found something 'new'. Generally though, it is likely that the same fault will have occurred on other chips.

Best Wishes
temopic



Joined: 20 Feb 2008
Posts: 27
Location: mexico

View user's profile Send private message MSN Messenger

PostPosted: Mon Nov 24, 2008 10:02 am     Reply with quote

I am using the slave_select from the master to the slave.

How could I work around this?
Ttelmah
Guest







PostPosted: Mon Nov 24, 2008 10:17 am     Reply with quote

Do what I describe in the third paragraph of my post, in your master. There is no fix at the slave end.
Otherwise just contact Microchip, and ask for chips without this fault. They will normally exchange for a version without the problem, if you are using a device that has a known fault like this appear on a latter revision.

Best Wishes
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