cy8ckit-043 4m series -- more than 8 analog pins

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

cross mob
Anonymous
Not applicable

I am using the CY8CKIT-043.

   

 

   

The PSOC 4m device appears to have only one a/d type which is a sequencing a/d type.

   

I am having trouble adding more than 8 analog pins to the a/d mux.  Problem is that after the 8 pin on the sequencing pin I yellow marker on the pin when I try the allocate more pins.  The warning legend is reachable but will lead to routing conjestion or failure.

   

When two or more analog muxes are used, then the pins are allocatable, but I have not found a way to connect them to the sequencing a/d.

   

 

   

What I am looking for is (2) consequentive 8 analog pins where, each pin does not have external capacitors attached to the pins.  Also I need 3 additional analog input pins.  This leads to 19 analog inputs into the A/D.

   

 

   

Is this possible?  A fallback position would be to have 19 analog input pins which do not have external capacitors connected  to them.

   

 

   

Thanks.

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

I was in contact with Cypress on a similar case, trying to route 13 analog inputs to the sequencing ADC. This is what Cypress answered;

   

I have got confirmation. PSoC 4200M supports 8 dedicated pins from SAR Mux, 2 pins through the analog mux bus, and 4 from opamp pins. The datasheet does not clearly mentions this. I am sorry for inconvenience. In the project, only 10 pin cannot )**EDIT** must read "can") be connected if no opamps are used. If opamps are used, it is possible to connect 4 more pins through the SAR Mux Bus.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks for the input Bob.

   

I did the following.  I made the SAR Mux A/D have one channel.  Then I placed a 19 channel analog mux in front of the SAR Mux.  I was able to build with no errors or warnings.  Have not  put code around it to test.

   

 

   

Should this work?  If so is there a more optimium way to do this, like adding more SAR Mux channels.  

   

Thanks

   

Glenn

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

Give it a try, I haven't tested that.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Setting the PSOC 4m to one channel and feeding this input with a 20 channel analog mux allows me to read 20 pins.  The pins that are not on the p2 port have yellow channel indicators.  The project builds and successfully works in operation.

   

A followup question.  The technical reference manuals suggest that a sar of 16 pins can be used.  There is no example of how to do this.  Basically it appears that only 8 channels can be used by in the SAR mux.  Something is strange in that cypress designed the part for 16 channels.  Can 16 channels be used for the SAR mux?  My experience says no.

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

When some of the channels (4) come from the OpAmps you're up to 12, the remaining 4 channels are allowed for some other internal connections (I've forgotten which). Cypress promised to update the datasheet to point that out.

   

 

   

Bob

0 Likes
Tal1
Level 1
Level 1
First question asked 5 sign-ins First reply posted

So are there any example for reading more than 8 analog inputs, how it can be possible for PSOC 42xx series? 😞

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,
So, I gave it a try.

IMG_5442.JPG

And Tear Term seems reporting different voltages for each Analog Input.

001-TeraTerm-log.JPG

The schematic

002-schematic.JPG

The Pins

003-Pins.JPG

main.c

#include "project.h"
#include "stdio.h"

#define NUM_CH 19
#define STR_LEN 64
char str[STR_LEN+1] ;

void init_hardware(void)
{
    CyGlobalIntEnable; /* Enable global interrupts. */
    
    AMux_Start() ;
    ADC_Start() ;
    
    UART_Start() ;
    UART_UartPutString("\x1b[2J\x1b[;H") ;
}

int main(void)
{
    int ch ;
    uint16_t count ;
    int16_t mV ;
    
    init_hardware() ;

    for(;;)
    {
        for (ch = 0 ; ch < NUM_CH ; ch++ ) {
            AMux_Select(ch) ;
            ADC_StartConvert() ;
            ADC_IsEndConversion(ADC_WAIT_FOR_RESULT) ;
            count = ADC_GetResult16(0) ;
            mV = ADC_CountsTo_mVolts(0, count) ;
            snprintf(str, STR_LEN, "ch %02d: %d.%03d, ",ch, mV/1000, mV%1000) ;
            UART_UartPutString(str) ;
        }
        UART_UartPutString("\n\r") ;
        CyDelay(1000) ;    
    }
}

The remaining problem is what I should do with these 19 resistors 😜

moto

0 Likes