 |
 |
| View previous topic :: View next topic |
| Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Sep 05, 2008 12:30 pm |
|
|
| Quote: | #fuses EC_IO
#define FOSC 32000000
#use delay (clock=FOSC)
|
In your latest code, you show the EC_IO fuse. Your schematic shows
a crystal. I don't believe that a crystal will work in EC_IO mode.
I did a test with an 18F452 and a 20 MHz crystal, and it didn't work.
I had to change it to HS to make it work. Also, the 18F722 data sheet
shows that the maximum crystal frequency for HS mode is 25 MHz.
I question whether your board is working. Is this project being done
on an actual board, or is this a Proteus (or other simulator) project ?
If you do get the PIC oscillator working, I suggest that you make a
test program that does a reset operation to the CS5526, and then
read the config, offset, and gain registers. The data sheet says that
after a reset operation, they will have this value:
| Quote: | configuration register: 000040(H)
offset register: 000000(H)
gain register: 800000(H) |
This test will confirm that you can read the chip OK. |
|
 |
bela
Joined: 31 Aug 2008 Posts: 27 Location: Bedford, BEDS UK
|
|
Posted: Sun Sep 07, 2008 2:12 am |
|
|
Hello PCM Programmer,
I shoud have mentioned previously that the crystal on the schematic has been replaced with a 32mhz oscillator which runs off the 5v_live net. It runs very well, timing wise, on external clock mode, as you pointed out earler.
This is an actual PCB not a simulation. Lots of features appear to be working well, eg, the USB and all of the I2C devices.
I have previously tried the experiment that you suggest. Perform a reset sequence and read back the registers. They're all 00s. Can you confirm that I have the reset sequence correct? I performed the reads after the 15 0xFFs and 1 of 0xFE.
Thanks for your help.
Daz. |
|
 |
bela
Joined: 31 Aug 2008 Posts: 27 Location: Bedford, BEDS UK
|
|
Posted: Mon Sep 08, 2008 2:28 pm |
|
|
| Can anyone help with this? |
|
 |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Sep 08, 2008 2:39 pm |
|
|
Post a test program that does these tests, where you send a Reset
command to the chip, and then read specific registers.
Make sure the code that you post is compilable with no errors. |
|
 |
|
|
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
|