regulator oswietlenia na pilota

Z tych wypocin (raczej sklejki) ponizej ma byc cos takiego jak w temacie.. :)

mam tylko maly problem okazuje sie ze w domu mam tylko jeden pilot ktory dziala w RC5. pilot ktory mie interesuje (ktorym chcialbym regulowac) , niesety ma jakis inny system nadawania.

noi moje pytanie jak sprawdzic uzywajax bascoma, wyswietlacza lcd jakie wartosci odpowiadaja przyciskom to nie ma byc regulator uniwerslany, moze miec na stale przypisane wartosci. lcd jest ytylko uzyty "na chwile" normalnie nie bedzie uzywany. nie iwem jak sie do tego zabrac, jak wyglada to kodowanie? ma ktos rozpracowany ten temat ??

uzywam AT90S2313 + TFMS5360

pozdrawiam Arkos

'use byte library for smaller code $lib "mcsbyte.lbx" Config Portd = &B11111000 Portd = 255 'spoczynkowy stan "1" Config Portb = 255 Portb = 255 Config Rc5 = Pind.2 Config Timer1 = Pwm , Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear Down Pwm1a = 0 Enable Interrupts Dim Address As Byte , Command As Byte Dim Wartoscpwm As Byte 'Dim Zgaszapal As Bit 'Zgaszapal = 0 Cls Lcd "RC5..." Wait 1 Do Getrc5(address , Command) 'we check for the TV address and that is 0 If Address = 0 Then Command = Command And &B01111111 Locate 2 , 1 Lcd "adr" ; Address ; " kom" ; Command ; Cursor Off End If 'If Command = 12 Then Toggle Zgaszapal 'If Zgaszapal = 0 Then Pwm1a = 0 'Else ' If Zgaszapal = 1 Then Pwm1a = 255 'End If If Pind.0 = 0 Then Decr Pwm1a If Command = 19 Then Decr Pwm1a If Pwm1a = 1023 Then Pwm1a = 0 If Pind.1 = 0 Then Incr Pwm1a If Command = 18 Then Incr Pwm1a If Pwm1a = 256 Then Pwm1a = 255 'command = 0 Wartoscpwm = Pwm1a Locate 1 , 10 Lcd "Pwm " ; Wartoscpwm ; " " Loop End

Reply to
arkosss
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.