Microcontrollers

Project: SPI controller using DAC slave and PIC slave to change the speed of two motors, read the speed of one of these motors and control 8 actuators

Students set up SPI link with serial DAC SPI Slave and PIC16f877a SPI master.

A motor controller uses a driver circuit that amplifies an analogue signal sent from a microcontroller though a SPI enabled slave DAC chip and an SPI enabled slave PIC16f877a.

The master microcontroller is in idle mode and
If the master receives a signal from a PC via its USART indicating that motor 1 should undergo a change in speed, the master moves into change speed of motor 1 mode, the next signal the master receives from the USART indicates the speed the master will set the SPI DAC at (which controls the speed of motor 1), the master then enters its idle mode again and waits to receive a signal from the USART.
If the master receives a signal from a PC via its USART indicating that motor 2 should undergo a change in speed, the master moves into change speed of motor 2 mode, the next signal the master receives from the USART indicates the speed the master will set the SPI DAC at (which controls the speed of motor 2), the master then enters its idle mode again and waits to receive a signal from the USART.
If the master receives a signal from a PC via its USART indicating that the master should read the speed of motor 1, the master then enables the PIC16f877a slave and sends a signal to the slave indicating it wants into read speed of motor 1, the PIC16f877a slave performs an ADC and loads the SPI buffer with the result of the ADC. When the masters sends a second SPI signal to the slave, the slaves ADC result is transferred into the master. The master should display the speed of motor 1 by sending a signal to the PC using the USART notifying the user of the speed of motor 1.
If the master receives a signal from a PC via its USART indicating that the master should write to 8 linear actuators connected to pins on port D (8 LEDs connected to port D, the master then enables the PIC16f877a slave and sends a signal to the slave indicating that it wants to change the status of the 8 actuators in the system. The master then performs a second write to the PIC16f877a slave and sends a value for the status of 8 actuators in the system; the PIC16f877a slave uses the second value from the master and writes this value to port D. The slave should also place the value it has written to port D in its SSPBUF and when the master performs a third write to the slave SPI, the value in the slaves SSPBUF should be transferred back to the master. The master should display this value on the PC using the USART notifying the user of the status of 8 sensors connected to port D.

Marking:
Weighting 30%
Total marks 100
Introduction 10 max marks
Description of the problem (flowcharts, pseudo code, outline of the problem and proposed solutions) 20 max marks

Software that is functional 40 max marks
Demonstration and documentation of functional system 20 max marks
Conclusions 10 max marks

Note a presentation will take place that will contribute to the final mark.


Get professional help with your research essay paper today from our student essay service. For all your Academic Essay/ Research/ Thesis/ Dissertation/ writing needs at an affordable price. 100% authenticity and on-time delivery/ Overnight delivery/ 6 hours delivery. Try our services and we assure you of getting a good grade in your coursework, Term Paper, Research Paper, Thesis, or Dissertation. Order this paper and enjoy a 20% discount today