• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pic18f4550- program question

Status
Not open for further replies.

joshua17ss2

New Member
I have a board i made to control my Christmas lights, its very simple, i had a question on programming.
The code is written is Swordfish basic, the set up is simply a pic18 connected to 3 uln buffers to some ssr relays
Is there a simple line to set the state of all the pins in a bank to the desired state.
so instead of high 1 low 1 high 2 high 3 low 3 (individually specifying the state pin by pin.)
i think ive seen it in assembly, as trisb%=00101101.

so i can quickly switch the state of multiple pins with a tiny bit of code.
(i have tried learning assem language, didn't work out so well)
Any help on this would be appreciated.
thanks
josh
 

joshua17ss2

New Member
I did not try that, i just added it in the code and it looks like it compiled right, i will try and download it to the board tonight and see if that works

Thanks
 

joshua17ss2

New Member
I downloaded the new code to the board and it works perfectly, thanks so much for the help
I will now create a christmas tree that will inspire awww and mabye a touch of dizzyness :D
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top