Hi,
I just try enough time but don't do it really to write and read on the register of an CompactFlash, I think that is the same for an external ram.
I have an embedded system, a pcb which have an AT89C51SND ( for mp3 ) communicating with a CompactFlash and I want to test this communication. I want to read a sector (register) in the Compact Flash so I try first to write on the external ram and read this values but it doesn't work a work in true ide mode for the CompactFlash. Can you help me please?
So my code is:
//initial values//
CS0 = 0x00; //CS0 CS1 = 0x01; //CS1 PIO_RESET = 0x01; AUXR = 0x0D;// ALE is activated for MOVEx
//program//
extern xdata Byte volatile CF_SECTOR_COUNT _at_ 0x1F2; CF_SECTOR_COUNT = 16; //for example printf("CF_SECTOR_COUNT=%x \n\r",CF_SECTOR_COUNT); AUXR=0x0D;
//results//
CF_SECTOR_COUNT=301
//////////////////////////////////////////////
Is that the good way to test an external register of the compactflash ?
Thank you.
Sems