Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

RC motors with PWM

Status
Not open for further replies.

jameske

New Member
I've been working on a project making a fishing boat that is remote control. It has a three motors and one solenoid at the receivers end and 2 potentiometers and 2 switches at the transmitting end. I am using AVRs ATtiny13 to control everything, however, I am trying to figure out how to make the two uCs communicate (non-bidirectional). Since the tiny13 doesn't have a TX pin or RX pin is there another way to communicate between these two uCs?

James

(I hope this is clear enough)
 
OK, I have looked at UART/USART but that's no good (no TX or RX pin), Parallel communication isn't any good either as I don't have enough pins. Is there another protocol that might work (I need to get it down to one line for the DATA input on my wireless TX and RX modules)
 
Wow I didn't know there were controllers without a UART, or such a small embedded-oriented controller to not have I2C.

However, it does appear to have SPI and that should work just fine (MOSI, MISO, and SCK). Pretty simple to understand how SPI works. SCK clocks the data travelling on the other two lines. It is driven by one of the devices which is defined as the master. Data travels one way on MOSI and the opposite way on MISO. Simple binary data that you can interpret however you wish.

MOSI = Master Out/Slave In
MISO = Master In/Slave Out

That said...you might have problems dealing with distance. UART can use transceivers to increase drive strength, noise tolerance, and distance. I2C as well to a lesser degree. SPI...not so much because it is meant to communicate between devices on the same PCB. I2C as well but not quite as much. However, there are buttloads of UART controllers, CAN controllers, and I2C controllers (as well as separate transceivers, buffers, and amplifiers ICs to increase the drive strength of these protocals) that are interfaced to MCU's via SPI. So you can take that route to add that capability onto a lacking MCU...or just get a slightly larger MCU.
 
Last edited:
Thanks I didn't think about SPI. I'll give it a shot, otherwise I'll just have to buy something a little bigger!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top