Chodzi o to, że kiedyś wypatrzyłem na Bartka stronie tą super sztuczkę i do tej pory nie miałem z tym problemów, ale... ale wymyśliłem sobie, że chciałbym zmieniać konfigurację poprzez UART i tu pojawił się problem
Jak to powinno wyglądać? Coś takiego nie chce działać
- $regfile = "m328pdef.dat"
- $crystal = 8000000
- Dim Cyfra As Byte : Cyfra = 1
- Konfiguracja = Cyfra
- 'Const Konfiguracja = 1
- #if Konfiguracja = 1
- Config Lcdpin = Pin , Db4 = Portb.2 , Db5 = Portb.3 , Db6 = Portb.4 , Db7 = Portb.5 , E = Portb.0 , Rs = Portc.0
- Config Lcd = 20x4 'nowy typ zapisu
- #endif
- #if Konfiguracja = 2
- Config Lcdpin = Pin , Db4 = Portb.2 , Db5 = Portb.3 , Db6 = Portb.4 , Db7 = Portb.5 , E = Portb.0 , Rs = Portb.1
- Config Lcd = 16x2 'nowy typ zapisu
- #endif
- #if Konfiguracja = 3
- Config Lcdpin = Pin , Db4 = Portc.3 , Db5 = Portc.2 , Db6 = Portc.1 , Db7 = Portc.0 , E = Portc.4 , Rs = Portc.5
- Config Lcd = 16x2 'nowy typ zapisu
- #endif
- Do : Loop : End
Chodzi o to jak poprawnie podstawić zmienną "Cyfra" do "Konfiguracja"?
Z góry dziękuję za pomoc.
Pozdrawiam.
Piotrek