Difference between revisions of "ME 333 Readings, Videos, and Sample Code"

From Mech
Jump to navigationJump to search
Line 76: Line 76:


===Chapter 7: Digital Input and Output===
===Chapter 7: Digital Input and Output===
** [[Media:DIO_plib.c|DIO_plib.c]]
** [[Media:DIO_sfrs.c|DIO_sfrs.c]]


----
----


===Chapter 8: Counters / Timers===
===Chapter 8: Counters / Timers===
** [[Media:TMR_5Hz.c|TMR_5Hz.c]]
** [[Media:TMR_external_count.c|TMR_external_count.c]]
** [[Media:TMR_pulse_duration.c|TMR_pulse_duration.c]]


----
----


===Chapter 9: Output Compare===
===Chapter 9: Output Compare===
** [[Media:OC_analog_out.c|OC_analog_out.c]]
** [[Media:OC_PWM_plib.c|OC_PWM_plib.c]]
** [[Media:OC_PWM_sfrs.c|OC_PWM_sfrs.c]]
** [[Media:OC_signal.m|OC_signal.m]]


----
----


===Chapter 10: Analog Input===
===Chapter 10: Analog Input===
** [[Media:ADC_Read2.c|ADC_Read2.c]]


----
----
Line 105: Line 115:


===Chapter 12: SPI Communication===
===Chapter 12: SPI Communication===
** [[Media:SPI_loopback.c|SPI_loopback.c]]
** [[Media:SPI_pic_to_pic.c|SPI_pic_to_pic.c]]
** [[Media:SPI_DAC_MCP4922.c|SPI_DAC_MCP4922.c]]
** [[Media:SPI_ADC_MCP3008.c|SPI_ADC_MCP3008.c]]
** [[Media:SPI_SRAM_23K256.c|SPI_SRAM_23K256.c]]
** [[Media:SPI_microSDcard.c|SPI_microSDcard.c]]
** [[Media:SPI_accelerometer_ADXL362.c|SPI_accelerometer_ADXL362.c]]


----
----


===Chapter 13: I2C Communication===
===Chapter 13: I2C Communication===
** [[Media:I2C_loopback.c|I2C_loopback.c]]

** [[Media:I2C_pic_to_pic.c|I2C_pic_to_pic.c]]
** [[Media:I2C_DAC_MAX518.c|I2C_DAC_MAX518.c]]
** [[Media:I2C_ADC_NAU7802.c|I2C_ADC_NAU7802.c]]
** [[Media:I2C_SRAM_PCF8570P.c|I2C_SRAM_PCF8570P.c]]
** [[Media:I2C_accelerometer_LSM303DLHC.c|I2C_accelerometer_LSM303DLHC.c]]
----
----


===Chapter 14: USB===
===Chapter 14: USB===
** [[Media:USB_HID.zip|USB_HID.zip]]
** [[Media:USB_CDC.zip|USB_CDC.zip]]
** [[Media:USB_thumbDrive.zip|USB_thumbDrive.zip]]


----
----


===Chapter 15: Input Capture===
===Chapter 15: Input Capture===
** [[Media:IC_loopbackPWM.c|IC_loopbackPWM.c]]
** [[Media:IC_readRemoteControl.c|IC_readRemoteControl.c]]


----
----


===Chapter 16: Comparator===
===Chapter 16: Comparator===
** [[Media:COMP_internal.c|COMP_internal.c]]
** [[Media:COMP_output16values.c|COMP_output16values.c]]
** [[Media:COMP_INT2values.c|COMP_INT2values.c]]


----
----


===Chapter 17: Watchdog Timer===
===Chapter 17: Watchdog Timer===
** [[Media:WDT_enableReset.c|WDT_enableReset.c]]
** [[Media:WDT_checkPreviousReset.c|WDT_checkPreviousReset.c]]


----
----


===Chapter 18: Storing Data in Flash Memory===
===Chapter 18: Storing Data in Flash Memory===
** [[Media:FLASH_write.c|FLASH_write.c]]


----
----


===Chapter 19: Power Saving===
===Chapter 19: Power Saving===
** [[Media:PWR_sleep.c|PWR_sleep.c]]


----
----


===Chapter 20: Real-time Clock and Calendar===
===Chapter 20: Real-time Clock and Calendar===
** [[Media:RTCC_set.c|RTCC_set.c]]


----
----


===Chapter 21: Controller Area Network (CAN)===
===Chapter 21: Controller Area Network (CAN)===
** [[Media:CAN_pic_to_pic.c|CAN_pic_to_pic.c]]


----
----


===Chapter 22: Direct Memory Access===
===Chapter 22: Direct Memory Access===
** [[Media:DMA_adc.c|DMA_adc.c]]
** [[Media:DMA_spi.c|DMA_spi.c]]


----
----

Revision as of 13:06, 16 December 2013

Readings, videos, exercises, and sample code for ME 333 Introduction to Mechatronics.

Appendix: A Crash Course in C

Reading: A Crash Course in C

Videos:

  1. Writing your first program in C, HelloWorld.c (5:09). Chapter A.1. Exercises: 1.
  2. Differences between C and MATLAB (7:30). Chapter A.2. Exercises: 2, 3.
  3. Binary and hexadecimal (Base 2 and 16) (4:47). Chapter A.3.1. Exercises: 4, 6.
  4. Data types (5:30). Chapter A.3.1. Exercises: 8, 10.
  5. Using the data types (3:49). Chapter A.3.1. Exercises: 11.
  6. Representations of data types (5:15). Chapter A.3.1. Exercises: 12, 13.
  7. Pointer basics (5:54). Chapter A.3.2. Exercises: 14, 15.
  8. Sample program: printout.c (5:55). Chapter A.4. Exercises: 16 (not covered in video, reading only) 17, 18.
  9. Sample program: datasizes.c (2:57). Chapter A.4. Exercises: 9.
  10. Sample program: overflow.c (2:43). Chapter A.4. Exercises: 19.
  11. Sample program: typecast.c (5:43). Chapter A.4. Exercises: 20.
  12. invest.c, part 1/5: intro to a typical C program (4:18). Chapter A.4. Exercises: 23.
  13. invest.c, part 2/5: overview (3:58). Chapter A.4. Exercises: 24, 25.
  14. invest.c, part 3/5: sections 1-4: program comments, preprocessor commands, new data type definitions, and global variables (4:48). Chapter A.4. Exercises: 26.
  15. invest.c, part 4/5: sections 5-6: helper function prototypes and the main function (4:40). Chapter A.4.
  16. invest.c, part 5/5: section 7: helper functions (7:42). Chapter A.4. Exercises: 28-30, 32, 33 (some material covered in reading only).

Sample Code:



Chapter 1: Quickstart


Chapter 2: Looking Under the Hood: Hardware


Chapter 3: Looking Under the Hood: Software


Chapter 4: Using Libraries


Chapter 5: Time and Space


Chapter 6: Interrupts


Chapter 7: Digital Input and Output


Chapter 8: Counters / Timers


Chapter 9: Output Compare


Chapter 10: Analog Input


Chapter 11: UART


Chapter 12: SPI Communication


Chapter 13: I2C Communication


Chapter 14: USB


Chapter 15: Input Capture


Chapter 16: Comparator


Chapter 17: Watchdog Timer


Chapter 18: Storing Data in Flash Memory


Chapter 19: Power Saving


Chapter 20: Real-time Clock and Calendar


Chapter 21: Controller Area Network (CAN)


Chapter 22: Direct Memory Access


Chapter 23: Sensors and Signal Conditioning


Chapter 24: Digital Signal Processing


Chapter 25: Brushed Permanent Magnet DC Motors


Chapter 26: DC Motor Control


Chapter 27: Brushless Motor Control


Chapter 28: Stepper Motors and RC Servos


Chapter 29: Connecting to an Android Device