Results
The final product incorporates 9 useful painting tools. From left to right on the menu line of the above screen shot, they are free draw, line draw, rectangle draw, erase, circle draw, clear screen, cut/copy, spray paint, and polygon draw. We also incorporated different brush sizes for both the free draw and erase tools. These nine tools make our painting program fairly versatile. The user interface is very straightforward, so anybody who knows how to operate a mouse can easily learn to use our program. Simply click the right mouse button at any time to choose the next tool and left click to use the tool. Special functions such as cycling brush size and copying are performed using the middle mouse button. Finally, we prevented the user from being able to edit the title and menu bars as well as the side lines to prevent any complications. The paint program does not appear to interfere with the strict timing considerations for the video signal generation because the video appears clear and free of error.
In the paint program, the only time that we had to perform the various functions required for drawing was during the 60 lines when we are not blasting bits out to the screen. Each line takes 63.6 us, so we had a total of about 63.6 us/line * 60 lines=3.82 ms to perform the required operations. Since our video signal is not affected by our painting code, we know that it does not go over that time constraint. The other timing constraint that we faced was from the mouse. The mouse has a 10 kHz clock, and it takes between 11-12 clock cycles to send or receive a full data packet from the mouse, which amounts to between 1.1-1.2 ms. The movement data comes in 3 packets, so it would take over 3.3 ms to receive all of the movement data. Since that takes up a considerable portion of the time between lines and also because sending and receiving prevents anything else from occurring while it is in the process, we had to move the mouse interface on a separate MCU. The slower clock on the mouse does not affect the accuracy of the movement, though, because it still has time to update the movement data more than once per screen refresh, which occurs approximately every 16.5 ms, and we only use the mouse position data once per screen refresh in our painting code.
During the design of our project, the main safety concern was the electrical hazard. We made sure to never directly touch any metal components that were connected to the power rail. We also separated the power and ground rails so that they were on opposite sides, and we made sure to never directly connect power to ground. We studied the pinouts for the mouse extensively before attempting to connect it to power to ensure that we correctly connected to the correct pins. Our circuitry does not generate any RF signals, and the noise generated by the relatively low power MCU is negligible. Therefore, our equipment should not interfere with nearby electronics.
![]() |
![]() |
![]() |
![]() |


