The first 21 Fibonacci numbers Fn for n = 0, 1, 2, ..., 20 are:
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
Detailed specifications of the program
Input
The input is taking from the keypad matrix based on PORTB by pressing on
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
*
|
0
|
#
|
Note:
- To input a number you have to enter it digit by digit then press #
Program starts to enter the index of the Fibonacci number you wish to end at it.
So if you enter 8, the program with output the first 8 Fibonacci numbers: 0, 1, 1, 2, 3, 5, 8, 13
When you hit "8" on the keypad now number have "8". To end editing in number hit "#" and the Fibonacci Series will appear on the display.
So if you enter 8, the program with output the first 8 Fibonacci numbers: 0, 1, 1, 2, 3, 5, 8, 13
When you hit "8" on the keypad now number have "8". To end editing in number hit "#" and the Fibonacci Series will appear on the display.
Output
Program Properties
List of the used resources
- Laptop with windows platform.
- MPLAB X IDE v1.70 for developing.
- PIC Simulator IDE for simulating PIC16F877 microcontroller.
- Keypad Matrix
- 7 Segment Display
- PIC C Language.
Keypad Matrix configuration
7 Segment Display configuration
Download code here.












No comments:
Post a Comment