120 likes | 270 Views
ECT 357. Ch 4-5 Program Development. Today’s Quote: Your companions are like the buttons on an elevator. They will either take you up or they will take you down. He that walketh with wise men shall be wise: but a companion of fools shall be destroyed. Proverbs 13:20.
E N D
ECT 357 Ch 4-5 Program Development
Today’s Quote: Your companions are like the buttons on an elevator. They will either take you up or they will take you down. He that walketh with wise men shall be wise: but a companion of fools shall be destroyed. Proverbs 13:20
Microcontroller Programming Overview • Sense Inputs • Device Inputs • Debounce • Analog • Serial Communications
Microcontroller Programming Overview • Control Outputs • LCD • LED’s • Buzzer • Analog • Serial Communications
Algorithms • LCD Display • Serial Communications • Counting Intervals • Debounce • Time Delay • Decision Making • Control
QwikFlash Board I/O • Analog Potentiometer Input • Digital LED Output’s • Temperature Sensor Input • LCD Output • Pushbutton Switch Input • Rotary Pulse Generator • Digital to Analog Converter • Analog and Digital Inputs
Macros MOVLF macro literal, destination movlw literal movwf destination endm
Subroutines Initial MOVLF B’10001110’, ADCON1 MOVLF B’11100001’, TRISA return
Include Statements Include statements point to files which include subroutines, labels, addresses, etc #include P18F452.inc
Vectors org 0x0000 ;Reset Vector nop goto Mainline org 0x0008 ;High Priority Interrupt Vector nop goto $ ;$ symbol means itself org 0x0018 ;Low Priority Interrupt Vector nop goto $
Program Parts • Program Hierarchy • Assembler Directives • Variables • Macros • Vectors • Programs • Subroutines
Assembly • Hex file .hex • Error file .err • List file .lst • Label file .cod