new to flowcode

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
phil..c
Posts: 11
Joined: Mon Nov 26, 2012 5:59 pm
Has thanked: 7 times
Contact:

new to flowcode

Post by phil..c »

i have been using pic chips for quite a while for simple programs, now i'm starting to do more complex programming using flowcode. What i need to find out is does the flowcode software automatically assign weak pull ups to inputs that have not been assigned within the programming. for examlpe if i am using 2 inputs on port A and using 4 outputs on port B, will the flowcode just not assign anything to the port bits not used or will it assign port A input, Port B output and i have to pull the inputs down on the hardware ? My thoughts are that they are left un assigned and so it will be ok to be left un connected, Any help greatly appreciated. thank you

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: new to flowcode

Post by Enamul »

Hi
You can enable weak pull-up in Flowcode for un-used bits or you can do that in hardware..But in Flowcode that can be done only by using c code..which is PIC dependent..So if you tell us which PIC you are using we can tell you how to do that.
Enamul
University of Nottingham
enamul4mm@gmail.com

phil..c
Posts: 11
Joined: Mon Nov 26, 2012 5:59 pm
Has thanked: 7 times
Contact:

Re: new to flowcode

Post by phil..c »

thank you for the reply, I am not good with the 'C' programming code i used the lower level code as i understand that better, (but im by no means an expert!!!) The pic chip is 16f716 or 16c716. i am using the 16f for developing then when all is well the 16c. I really appreciate your help.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: new to flowcode

Post by Enamul »

No problem. The pic chip 16f716 has no soft-weak pull-up option for PORTA. It has pull up option for PORTB but not for individual PIN rather for whole PORTB. If you enable weak pull up and later on if you use PORTB as output; it will disable weak pull up. But if you have any unused pin in portb which is defined as input you will get pull-up feature there.

To enable weak pull up in portb, you have to add following line in the beginning of the code in c code box..

Code: Select all

cr_bit(option_reg,7);
Enamul
University of Nottingham
enamul4mm@gmail.com

phil..c
Posts: 11
Joined: Mon Nov 26, 2012 5:59 pm
Has thanked: 7 times
Contact:

Re: new to flowcode

Post by phil..c »

thanks very much for the help, much appreciated

Post Reply