18F8722 Port F and H problem

General discussion on mikroPascal.
Post Reply
Author
Message
Sharpie
Posts: 2
Joined: 02 Feb 2009 17:47
Location: UK

18F8722 Port F and H problem

#1 Post by Sharpie » 02 Feb 2009 17:57

Hi,

I have a very strange thing happening on my 18F8722 based board. On Port H I have two LEDs on bits 0 and 1 and a relay on bit 7. If I do PORTH.Relay := 1 then the relay goes on. If I then execute PORTH.GreenLed := 1 the green LED goes on and the relay goes off.

On Port F I have two relays. If I set one on followed by the other then the first switches off as the second switches on.

I've checked configuration bits, I've tried a different board and I've traced through the code with a debugger, all to no avail.

Anybody any ideas? I hope so as I've run out.

TIA, Sharpie

zan
Posts: 434
Joined: 15 May 2007 19:35

#2 Post by zan » 02 Feb 2009 18:25

Search this forum for 'Read Modify Write'

Sharpie
Posts: 2
Joined: 02 Feb 2009 17:47
Location: UK

#3 Post by Sharpie » 02 Feb 2009 21:14

How easy these things are when you know what you're talking about. Thank you Zan, I'm sure that'll do the trick.

pompy
Posts: 2
Joined: 02 Mar 2012 12:16

Re: 18F8722 Port F and H problem

#4 Post by pompy » 05 Mar 2012 08:56

Hi,
I have the same problem but I don't understand the answer.
What's the solution for this problem?
Thank you in advance!

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: 18F8722 Port F and H problem

#5 Post by filip » 05 Mar 2012 11:29

Hi,

Please, look at the Read Modify Write topic in the Help file for more information regarding this subject.

Regards,
Filip.

Post Reply

Return to “mikroPascal General”