We are using PORT0 of DS80C400 as DATA0-DATA7 singals. We want to write data using PORT0 to external DAC. We are using Peripheral Chip enable 3 (PCE3 in Port5.7 -> Address: 0x0E00000) Questions: 1)How to write data to Port0? 2)Sample: (Since don't know how to use Port0) char xdata *ADDR; // ADDR is used as PORT0 ADDR = 0x0E00000; // address of PCE3 *ADDR = 0xAA; // data to send We expect Port5.7 (address: 0x0E00000) to be set low (activate low) after the above is 3 command is run. But the Port5.7 did not do anything.
Hi Reinhard, Thanks for the reply. We have tired to access Port0 of DS80C400 as any other ports, but unsuccessful. Instead we were prompt: "unidentified idenifier". It is also the same even if we try to declare Port 0 in the header or in the source code. We do not know the address of Port0 and it is stated in the datasht that Port0 is unaccessible and cannot be changed in the datasheet. Yet it is used for Data D0-D7 in the IC. Can anyone help? Emily
Well, if the datasheet says you can't do that, odds are it's right. The people who wrote that document probably know the hardware better than you do. So: what was driving your decision to use port 0 for this? What made you believe it was possible?
Hi, The reason of using Port0 for data lines is because it was stated in the DS80C400 pin configurations for Data signal, Port0.0-0.7 is used as Data lines. And yet it says that its port0 can not be modified in firmware while sharing the same address as Port4. So I am confused and totally no idea how to use this port0.
Re-reading all your posts, it becomes increasingly clear that you have a terminology problem there. Contrary to what you write, you're not actually trying to use Port0 as a port. You're planning on memory-mapping that DAC chip. That means you're just using perfectly ordinary memory accesses to external XDATA memory. You seriously need to re-read all the relevant data sheets, and a generic 8051 manual, making sure you actually understand all the terms used in those documents before you proceed. You may even have to re-think the choice of the DS80C400 as your microcontroller.
"You seriously need to re-read ... a generic 8051 manual" That would be the documents commonly referred to as the "bible" for the 8051: Chapter 1 - 80C51 Family Architecture: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_ARCH_1.pdf Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf Chapter 3 - 80C51 Family Hardware Description: http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_HARDWARE_1.pdf