cancel
Showing results for 
Search instead for 
Did you mean: 

Code Examples

New Contributor

Hi, guys

I added a multiplexer with 2 clocks at clock in of UART module

The question is , how can I control the multiplexer select pin?

The logic "high" seems can't be change by program

Thanks

2222.png

0 Likes
Reply
1 Solution
Esteemed Contributor

Hi,

Although I have not been able to fully test the program,

probably adding a control register and control it from you program

will do what you want.

MUX_CTRL_REG.JPG

uint8_t value ;

value = Control_Reg_Read() ;

value = (value + 1) % 2 ;

Control_Reg_Write(value) ;

moto

View solution in original post

0 Likes
Reply
5 Replies
Esteemed Contributor II

You can use a one bit wide status register to provide a select signal.

Bob

0 Likes
Reply
New Contributor

Dear Bob

Thanks you reply so soon

But I cant understand how status register works and fit to what I need

Anywhere, thank you very much

0 Likes
Reply
Esteemed Contributor II

Obviusly not my day... I meant to use a control register, not status.

Bob

0 Likes
Reply
Esteemed Contributor

Hi,

Although I have not been able to fully test the program,

probably adding a control register and control it from you program

will do what you want.

MUX_CTRL_REG.JPG

uint8_t value ;

value = Control_Reg_Read() ;

value = (value + 1) % 2 ;

Control_Reg_Write(value) ;

moto

View solution in original post

0 Likes
Reply
New Contributor

Dear Motoo

Thanks your reply

It looks like what I need

Thanks

0 Likes
Reply
Top labels