Used for talking to devices like SD card on board, over short distances at high speeds. You have to have an interface fast enough for a "Real Time Interface." So for MP3 player you need a speed factor of about 10x.
Due: Oct. 28, 2008
Write a program to take single byte input data in the range of $00…$0F and print the corresponding character on the serial port. Print only one character from 0….F. In order to accomplish this, you have to include a routine to convert the input byte into the corresponding ASCII code.
Include that routine into the keypad scan routine such that (the ASCII code representing) the key that is pressed get’s printed on the serial port.
The RTI can be used to generate a hardware interrupt at a fixed periodic rate. If enabled (by setting RTIE=1), this interrupt will occur at the rate selected by the RTICTL register. The RTI timer runs with OSCCLK. See Figure 40. The RTIF bit is set to one at the end of the RTI time-out period.
For your homework, modify the “Display_Speed.asm” program by incorporating the timing routines from the “Ping_Pong Precise Timing.asm” program and show another character on the 4-digit display every 4 ms at a constant rate. (Do not speed up the display sequence).
Then, for your Project credit, run the program on the boards in the Computer lab and demonstrate to the TA. Then increase the time delay between characters by 1 ms at a time and note when the display starts noticeably flickering.
Write a subroutine that creates a 1ms delay by decrementing the X register in a loop for a processor frequencies of 8MHz, 16MHz & 24MHz. Since the program uses the X register, save it to the stack at the beginning of the routine and restore it from the stack at the end of the routine.
Before getting too involved in trying to develop in assembly or for the HCS12 it might be a good idea to review addressing methods.
Due September, 16th 2008
Write a program that swaps the upper and lower 4 bits in a byte. For example if the input byte has a value of $D8 the result should be $8D. The input byte should be loaded into Accu A and the result should also be contained in Accu A. Write the program like a subroutine ending in RTS like the block fill examples. Look at the command set of the HC12 processor in particular bit-shift operations to accomplish the task. Each entry must be an individual contribution.
Recent comments
6 days 21 hours ago
6 days 21 hours ago
6 days 23 hours ago
1 week 6 days ago
2 weeks 5 days ago
2 weeks 6 days ago
2 weeks 6 days ago
8 weeks 6 days ago
12 weeks 4 days ago
13 weeks 4 days ago