You are here

analog pin MUX & globals | Cypress Semiconductor

analog pin MUX & globals

Summary: 1 Reply, Latest post by pvkv on 04 Oct 2010 07:20 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
robertseczkowski's picture
127 posts

I'm wondering what should be the right register( PORT4_MUX and PORT4_AG) value in case when 4 pins are configured as analog and other 4 are untouched.

presuming ports configured P4.4 P4.5 P4.6 P4.7 the right value for port4_MUX or port4_AG should be  0xF0 (upper nibble full of ones, lower nibble - zeros)

But in fact PORT4_MUX = 0x4C and PORT4_AG=0x4D


Does it make sense?


pvkv's picture
Cypress Employee
82 posts

 The pins becoming analog is nothing to do with how they connect to AG or AMUXBUS. The pin becomes analog when the driver on it and input buffer are removed from pin and it is made high Z. The pin connects to all the analog resources of PSoC through AG and AMUXBUS. AG and AMUXBUS are analog buses. There are total 16 AGs in the device four each quadrant of the device. And two AMUXBUS's one left and one right. Each pin can connect to one AG and one AMUXBUS. For example, pin P0.0 connects to AGL 4 and AMUXBUS-L. 

Now, when you want to use four pins of Port 4 as analog, make those pins as analog pin in the pin component and nothing else. According to what signal is connected to these pins the PSoC Creator will connect these pins to either AG  or AMUXBUS and route it and you don't need to do anything. If you want to manually manipulate the routing then write Port4_AG and Port_AMUXBUS in the code. So whenever the bit is set in Port4_AG, that particular pin of the port will connect to its AG. For example, Port4_AG=0x01 then pin P4.0 will be connected to its AG which is AGL4, If Port4_AG=0x80 then pin P4.7 connects to its AG which is AGL7. Similarly, when any bit is set in Port4_AMUXBUS register then that particular pin will be connected to AMUXBUS of its side, either AMUXBUS-Left or AMUXBUS-Right. For example, if Port_AMUXBUS=0x04 then pin P4.3 will connect to AMUXBUS of the same side which is AMUXBUS-L. The port 4 is on the left side so all the pins of the port 4 can connect to AMUXBUS-L.

Log in to post new comments.