Port control

General discussion on RSC-4x mikroC.
Post Reply
Author
Message
carbon9
Posts: 5
Joined: 01 May 2006 17:40

Port control

#1 Post by carbon9 » 27 May 2006 18:35

Dear friends,

I'm working on VR stamp using Mikro-C. I need your help: I am working on speaker dependent technology. I wanted to develop a program to control relays using port1 of VR stamp (of course I'll drive using transistors:)) I want to connect 8 relays to P1.0, P1.1, ....., P1.7 and control each relay independent of other accoırding to 8 voice commands. But I couldnt find a way to control pins independently. How can I accomplish this?

Thanks.

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: Port control

#2 Post by pizon » 29 May 2006 09:27

You can either use bit fields or good ol' masks.
pizon

kido
Posts: 5
Joined: 28 Mar 2008 08:44

Re: Port control

#3 Post by kido » 28 Mar 2008 08:59

carbon9 wrote:Dear friends,

I'm working on VR stamp using Mikro-C. I need your help: I am working on speaker dependent technology. I wanted to develop a program to control relays using port1 of VR stamp (of course I'll drive using transistors:)) I want to connect 8 relays to P1.0, P1.1, ....., P1.7 and control each relay independent of other accoırding to 8 voice commands. But I couldnt find a way to control pins independently. How can I accomplish this?

Thanks.
or p1Out, #01h ; p10 high

and p1Out, #FEh ; p10 low.

Similar for other pins.

Post Reply

Return to “RSC-4x mikroC General”