View previous topic :: View next topic |
Author |
Message |
temopic
Joined: 20 Feb 2008 Posts: 27 Location: mexico
|
HELP!!! pic18f2520 rev.1 and rev6 SPI differences |
Posted: Fri Nov 21, 2008 11:10 am |
|
|
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
|
|
Posted: Fri Nov 21, 2008 4:23 pm |
|
|
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
|
|
Posted: Mon Nov 24, 2008 8:29 am |
|
|
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
|
|
Posted: Mon Nov 24, 2008 9:47 am |
|
|
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
|
|
Posted: Mon Nov 24, 2008 10:02 am |
|
|
I am using the slave_select from the master to the slave.
How could I work around this? |
|
|
Ttelmah Guest
|
|
Posted: Mon Nov 24, 2008 10:17 am |
|
|
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 |
|
|
|