How to pull out AGND

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi all!

   

I need to make AGND available from outside a cy8c2714 (DIP-8 version) so I went ahead an placed a RefMUX, selected AGND as "Reference Select", routed the analoge column bus to port p0[4] with the output amplifier turned on.

   

Pin drive mode is "High Z Analog" and globals are set according to the attached image.

   

I was expecting Vdd/2 = ~2.5V on p0[4] but instead I see 5V - what am I doing wrong?

0 Likes
1 Solution
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You started the refmux with API and used the API call to select

   

AGND ?

   

 

   

W/o seeing your project tough for forum to help.

   

 

   

Regards, Dana.

View solution in original post

0 Likes
7 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You started the refmux with API and used the API call to select

   

AGND ?

   

 

   

W/o seeing your project tough for forum to help.

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The example code in the datasheet -

   

 

   
#include "m8c.h"
   
#include "RefMux.h"
   
void main(void)
   
{
   
    BYTE bRefSignal;
   
    RefMux_Start(RefMux_LOWPOWER);     // Turn on power to CT block
   
    bRefSignal = RefMux_AGND;          // Assign port number
   
    RefMux_RefSelect(bRefSignal);      // Apply AGND to ABUS2.
   
    
   
  // …Other code
   
}   Regards, Dana.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Did you issue a RefMux_1_Start() ?

   

 

   

Bob

Anonymous
Not applicable

 "Did you issue a RefMux_1_Start() ?"

   

Argh, that's it - how silly of me, I beg your pardon and should have known better by now - I tend to forget that a lot and I guess it's an extremely common beginner's mistake.

   

One could argue, the designer could add that line of code automatically but I know there are problems in doing so and personally, I'm allergic to automatic code insertion. I still remeber the frustration of using early "MS Front page" only too well 🙂

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Odd, datasheet names module as "RefMux", but when placed its

   

"RefMux_1" (w/o user edit).

   

 

   

It would be nice if API generator flagged a warning the module, or any module,

   

not started in user code. I will suggest that to team and fixes for data sheet

   

consistancy.

   

 

   

Lastly don't forget to error budget the Ref to Pin path in case you need a lot of

   

precision.

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

To forget the initialization is done easily. I tried using a function InitializeHarware() to collect all usermodules to initialize which gave me a pretty good overview.

   

Unfortunately I forgot sometimes to call InitializeHardware() from main

   

 

   

Bob

0 Likes
Anonymous
Not applicable

LoL

0 Likes