Subscribed and running through all videos. Greatly appreciated and learning much. Question: I'd like to connect two STM32F103's together to control 18 servo's for a spiderbot....I've got down the code for the basic logic on legs/joint/servo control but totally lost on how to talk to two STM32F1's with i2c. Can you make a vide on 2 mcu communications or provide a reference to a good solution? Domo-arigato Sir!
3 жыл бұрын
Thank you for the comment :) Also I am wondering if your option to choose two uC's for your project is just down to the lack of i/o on F103 or something else? If it's down to i/o, then I would recommend you to use just one as it's much easier to debug and write code. You can get a bigger package or get external peripherals to have multiple pwm outputs for servos, but I thing one larger IC would be much cheaper and easier. F407VG ~100pin has lots of timers with each having 4 outputs. Communication between two microcontrollers is usually done with UART as it is simpler and more robust. If you have just one pcb, then it's much less of a problem. If you want multiple uC, then something like i2c makes sense, else it doesn't. With uart each uC knows it's role. It is full duplex and you can use DMA to move data into temporary "buffers" so you can read the message whenever you have time(in main) instead of doing it in interrupt. I am working on a future video for implementing simple and robust api for communication between two uart devices in c++ so you will be able to implement it on pc in gui and for uC as well. Stay tuned :)
@Steven-jf4cs
3 жыл бұрын
And THAT is why you have the MAN!!! F401 or F411 20+ PWM pins - 2 for 10 bucks. I'll name my first spider-robot boy after you :)
Пікірлер: 4