I am newbie here.
I found this forum, I look there is great content inside this website, beside a forum.
Well, I watch on the website there are a sample for radio tuning with a rotary encoder, so I need help some help to your guys here to solved my problem to change the code from the button to be use a rotary encoder.
Here are my code :
Code: [Zaznacz cały] [Rozwiń/Zwiń]
- Do
- 'up
- If Pind.6 = 0 Then
- M_sel = 0
- Mem_bit = 0
- If Main_freq < 1080 Then Main_freq = Main_freq + 1
- Call Set_lcd()
- Waitms 180
- End If
- 'down
- If Pinb.6 = 0 Then
- M_sel = 0
- Mem_bit = 0
- If Main_freq > 875 Then Main_freq = Main_freq - 1
- Call Set_lcd()
- Waitms 180
- End If
- 'enter
- If Pind.7 = 0 Then
- If M_sel = 0 And Mem_bit = 0 Then
- Menu_index = 0
- Call Main()
- Else
- Incr Menu_index
- If Menu_index > 4 Then Menu_index = 0
- Bitwait Pind.7 , Set
- Select Case Menu_index
- Case 0 : Call Main()
- Case 1 : Call Lcd_home()
- Case 2 : Call Memory()
- Case 3 : Call Text()
- Case 4 : Call Svmem()
- End Select
- End If
- End If
- Loop
- End Sub
Ven