Hi,
I need to complile a program with 6 buttons lets say it's connected from portb0-5. When the user press button 1345 the code must send out serial 134&5. I'm still new with picbasic and I just don't know where to start?
Any help
Thanks
Hi,
I need to complile a program with 6 buttons lets say it's connected from portb0-5. When the user press button 1345 the code must send out serial 134&5. I'm still new with picbasic and I just don't know where to start?
Any help
Thanks
a bit far of what you need to do... but you may find some tricks in it...
Combination Gate Access
http://www.picbasic.co.uk/forum/show...=gate+operator
Enjoy!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thanks for that many info, but I think that is way over my head I'm only in my second week in picbasic and also doing it part time.
The code I started is like this for 4 buttons
Include "16f84a.inc"
Key1 var byte
Key2 var byte
Key3 var byte
Key4 var byte
Start: if portb.0 = 1 then key1 = 0
if portb.1 = 1 then key2 = 1
if portb.2 = 1 then key3 = 2
if portb.3 = 1 then key4 = 3
if porta.0 = 1 then Sout
goto start
Sout:
high 7
serout porta.4,N2400,[#key1,#key2,#key3,#key4]
clear
goto start
I did use the button function and I get the same result as the one above, the problem is that the code do send serout 0123 format, yes I know I set that up that way for serout, but I need to send it out in the sequence the buttons was pressed say for example 0231 or lets say there was a button that was pressed twice "0122", this is where I don’t know how to set that up
Thanks for all the help !
Bookmarks