please check my connections

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Bobw
Posts: 157
Joined: Sat Jan 22, 2011 10:39 pm
Location: Michigan
Has thanked: 6 times
Been thanked: 27 times
Contact:

please check my connections

Post by Bobw »

I am planning on using a 18F4455 pic.
I am working on the schematic of the electrical connections, and just want to make sure I haven't, missed something.

Switches (inputs) on RD0 thru RD6.
Relays (outputs) on RC0 thru RC2
Led (output) on RB5
Quadrature encoder on RB0 and RB3

LCD or a Glcd will be on the RA pins.

MCLR, PGD, PGC, VDD, VSS will be hooked up for pickit3 programmer.

Did I miss something?

Bob

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: please check my connections

Post by Benj »

Hi Bob,

I would put the Quad encoders on the upper nibble of PortB so you can use the interrupt on change functionality to automatically sample your encoders when they change state. Other then that looks ok.

Bobw
Posts: 157
Joined: Sat Jan 22, 2011 10:39 pm
Location: Michigan
Has thanked: 6 times
Been thanked: 27 times
Contact:

Re: please check my connections

Post by Bobw »

Ben,

Unless I miss read the data sheet, RB0, RB1, RB2 are listed as interrupts.
I thought only one of the encoder output needed to be on an interrupt?

Bob

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: please check my connections

Post by Benj »

Hi Bob,

You want the IOC Port change interrupt rather then the separate INT pin interrupts.

This way any change on pins RB4 - RB7 will trigger an interrupt which can then be used to call the encoder sample function.

In the datasheet refer to section 9.9

Bobw
Posts: 157
Joined: Sat Jan 22, 2011 10:39 pm
Location: Michigan
Has thanked: 6 times
Been thanked: 27 times
Contact:

Re: please check my connections

Post by Bobw »

Ben,
First of many thanks to come I am sure.
Yes I see it. I was only looking at the interrupt pins not the IOC pins.
Glad I ask the question now.

Bob

Post Reply