ΣSigmaStudio Ask AI Русский Log in

ADUC842

Processors & DSP Evgeny.Potemkin Oct 16, 2018 00:00 2 replies Original on forum ↗
Subscribe
Evgeny.Potemkin Question
Oct 16, 2018 00:00

Dear Sirs,

Our customer has chosen ADUC842 for their design.

However they faced a problem with the P3.6 output.

The designer was aimed to use this output for external circuit control.

When he writes ‘1’ value in the port – everything is ok.

But when he writes ‘0’ value – all is well until the data exchange between internal ADC and internal RAM is started.

In this case, on this pin a writing strobe to the external memory appears instead of ‘0’ value, i.e. alternative port function.

In the SFR P3 register with address B6h he writes a ‘0’ value.

What he does wrong?

Thanks in Advance and Best Regards,

Evgeny Potemkin

microcontrollers

8052 Core Products

aduc842

mark.ramos Reply
Oct 17, 2018 00:00

Hi,

P3.6 is a multifunction Pin, it looks like you're triggering the WR function for P3.6. Please control the whole port 3 using SFR P3 (B0H)

P3 = P3 | 0x40; // to output 1 or

P3 = P3 & 0xBF; //to output 0

-Mark

Evgeny.Potemkin Reply
Oct 18, 2018 00:00

Hi Mark,

Thanks for the reply.

Unfortunately, they did not manage to solve the problem. I will try to explain its essence in more detail.
The ADC of the microcontroller operates in direct memory access mode (DMA mode). In this case the internal memory of the microcontroller (XRAM) is used as a memory into which the ADC samples are loaded, but not the external RAM chip. They use internal (not external memory) by setting 1 in the low-order bit of the CFG842 register.
During the operation of the ADC in this mode, they need the R3.6 pin (specifically, pin 24) to keep at 0. However, during the exchange of the ADC with memory, recording strobes appear there, which leads to a malfunction of their device. It is clear that recording strobe is an alternative output function of P3.6, but they cannot turn it off.