Tom's November Blog
- Tom Hall
- Nov 22, 2019
- 1 min read
The main aim for November was to have the micro mouse move. This involved two main steps, construction and coding. The construction came first, and mainly consisted of screwing together the chassis of the mouse and making sure the motors could spin freely without rubbing against the outer frame.
The second step was the code; in our case the motors connect to port F so to get motors moving the port F data registers all need to be set as outputs and the port F pull ups need to be enabled. To do this we only need two lines of code.
PTFDD = 0xFF
PTFPE = 0xFF
This code sets up the motors but doesn’t turn them on, turn them on both in a forward direction the following code is needed.
PTFD = 0x05
Comments