Using C code
To generate a pattern on the LEDs that scrolls to the right at a slow enough rate to be visually perceptible, The 1st Switch changes the pattern and the 2nd Switch changes the speed of scrolling To become familiar with the 4 ports of the 8051, reading digital input from the dip switches and writing digital output to drive the 8 LEDs of the development board 9 OPERATION Switch 1 in the Off position will generate a pattern of OxFA and in the On position a pattern of Ox50. Switch 2 in the Off position will generate a slow scrolling rate and in the On position a faster scrolling rate. Port 0 takes binary Input from the switches while Port 1 drives the LEDs. Scrolling can be achieved using a logical right shift. A delay loop will have to be written in order to slow down the scrolling of the LEDs. Switch 2 will determine how many times the delay loop cycles which will essentially change the scrolling speed. A larger value will take longer than a smaller value Switch 1 doesn't have to update the new pattern immediately. This can simplify the coding with some implementations. Pattern wrap around is also not necessary To generate a pattern on the LEDs that scrolls to the right at a slow enough rate to be visually perceptible, The 1st Switch changes the pattern and the 2nd Switch changes the speed of scrolling To become familiar with the 4 ports of the 8051, reading digital input from the dip switches and writing digital output to drive the 8 LEDs of the development board 9 OPERATION Switch 1 in the Off position will generate a pattern of OxFA and in the On position a pattern of Ox50. Switch 2 in the Off position will generate a slow scrolling rate and in the On position a faster scrolling rate. Port 0 takes binary Input from the switches while Port 1 drives the LEDs. Scrolling can be achieved using a logical right shift. A delay loop will have to be written in order to slow down the scrolling of the LEDs. Switch 2 will determine how many times the delay loop cycles which will essentially change the scrolling speed. A larger value will take longer than a smaller value Switch 1 doesn't have to update the new pattern immediately. This can simplify the coding with some implementations. Pattern wrap around is also not necessary