Tom Gonser
- 27th April 2005, 04:58
I have a problem with my recording routine. I have 4 x 24LC512 chips in line with an 18F2525. The Chips are:
Chip1 con %10100000 ' address of chip1
Chip2 con %10100010 ' address of chip2
Chip3 con %10100011 ' address of chip3
Chip4 con %10100001 ' address of chip4
The problem is this: I record timestamped data to these chips one after the other. These 4 chips together hold 10 minutes of data at a .1 second update rate. I use a 'Chipselect' variable to start with chip1, then move through them all, counting to from 0 to 63872 on each chip (128byte pages) -- the data is mixed up.
My routine has a debug that shows on a monitor it is writing to chip1, chip2, etc., and shows the memory address. Watching it everything looks fine.
Then when I play it back, I see some really odd stuff. I'd expect to see is a list of data timestamped starting with Time=0 and ending with time=10.
What I see is mixed up data. A chip holds about 1500 records. so you'd expect:
Chip 1 = 0-1500
Chip2 = 1501=3000
chip3 = 3001-4500
chip4 = 4501-6000
but the time would just jump nicely from chip to chip... It doesn't
The data is mixed up 1 and 4 and 2 and 3 contain the same data...
Am I addressing these chips wrong?
Thanks..
Chip1 con %10100000 ' address of chip1
Chip2 con %10100010 ' address of chip2
Chip3 con %10100011 ' address of chip3
Chip4 con %10100001 ' address of chip4
The problem is this: I record timestamped data to these chips one after the other. These 4 chips together hold 10 minutes of data at a .1 second update rate. I use a 'Chipselect' variable to start with chip1, then move through them all, counting to from 0 to 63872 on each chip (128byte pages) -- the data is mixed up.
My routine has a debug that shows on a monitor it is writing to chip1, chip2, etc., and shows the memory address. Watching it everything looks fine.
Then when I play it back, I see some really odd stuff. I'd expect to see is a list of data timestamped starting with Time=0 and ending with time=10.
What I see is mixed up data. A chip holds about 1500 records. so you'd expect:
Chip 1 = 0-1500
Chip2 = 1501=3000
chip3 = 3001-4500
chip4 = 4501-6000
but the time would just jump nicely from chip to chip... It doesn't
The data is mixed up 1 and 4 and 2 and 3 contain the same data...
Am I addressing these chips wrong?
Thanks..