Arrowspace
Banned
- Joined
- Jan 23, 2015
- Messages
- 186
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 18
- Activity points
- 0
There is already hardware support on the uC to do that using assychronous transmission with UART built in module. Depending on the compiler that you are using, it is possible to implement such communication via firmware by API functions available at specific library.
I am using serial to parallel connected at RB0 pin of microcontorller
You could certainly implement a software UART (softUART) with only a TX line, as long as the baud rate remains sufficiently low there shouldn't be any major issues.
What compiler are you currently using?
Of course, another possible option is to utilize a multiplexer in addition to the existing device's hardware UART module, feasibility of this option depends largely on its current task and workload.
Could you also elaborate on your above statement? What exactly are you implying by the phrase, "using serial to parallel connected.."
BigDog
I am using serial to parallel connected at RB0 pin of microcontroller
How? 74HC795 is a simple shift register, not an UART. It needs three signals (serial data, serial clock, latch clock) for a SPI like interface. Apparently you didn't think your design through to the end.serial to parallel 74HC595
I have limited pin on my microcontorller ,that's why I have use serial to parallel converter, connected at RB0 pin , for clock I have use timer, clock is generating fine , I have checked, problem is data. How can I transmit serial data using single pin.
serial to parallel 74HC595
Ok. It is very simple. You are controlling Relays. You need 3 pin of MCU to interface 74HC595. Alternatly you can use I2C or SPI port expanders like PCF8574T which needs I2C or SPI module in your MCU. If you need low cost then use 74HC595. What is the problem ? Don't you have 3 MCU pins to connect 74HC595 to it ?
You have "already told" some things, but they didn't make much sense yet.Please find my circuit to get better understanding , I already told my serial port is busy and I do't you sufficient pin at my microcontorller that's you I have used serial to parallel communication IC 74HC595.
The first one is only working specifically with LCD interfaces, the second one should work, it's doing something quite similar to my post #7, applying some simplifications that are possible with HC595.See if methods used in these projects can be used for your purpose.
You have "already told" some things, but they didn't make much sense yet.
Now you are presenting a HC595 circuit that uses two pins rather than one processor pin. But it's still a bad design because it latches wrong data during the shift. Can be possibly tolerated for relays control because relays are slow.
If this solution works for your, we can close the discussion. Otherwise you can refer to the suggestions that have been already made, e.g. the one-wire logic.
- - - Updated - - -
The first one is only working specifically with LCD interfaces, the second one should work, it's doing something quite similar to my post #7, applying some simplifications that are possible with HC595.
View attachment 120703
Strictly speaking, the RC lowpasses are violating the HC595 input rise time specification, but I guess the design will work though.
See if methods used in these projects can be used for your purpose.
http://www.libstock.com/projects/view/660/2-wire-serial-lcd-using-cd4094
http://www.libstock.com/projects/view/1430/one-wire-16x2-20x2-20x4-lcd
I think the One-Wire LCD method will be fine. It uses one pin to interface 74HC595 to MCU. Timings are critical.
Your circuit is wrong. You cannot tie SH_CP and ST_CP. This way for evry bit data sent to 74HC595 it will immediately appear at the output.
from where you sending data on DS Pin
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?