URGENT help on PIC16F1827

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

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

Re: URGENT help on PIC16F1827

Postby JLeith » Sun May 12, 2013 9:07 pm

The Scoreboard must like Mothers Day.

Hyper Terminal worked the 1st time.

Martin I sent some files on your PM.

John

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8603
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2475 times
Been thanked: 3558 times
Contact:

Re: URGENT help on PIC16F1827

Postby medelec35 » Sun May 12, 2013 9:32 pm

Glad its all working for you now.

Do you think diagnostics that way will help?

Anything else you would like added?
Now you know what's going on, you could set a breakpoint.
press Run and when stopped at the breakpoint use F8 to single step.

It's also handy if you set up key Mappings.
If your not sure how to do that, take a look here:
viewtopic.php?f=31&t=7873&p=21219#p21219

Martin
These users thanked the author medelec35 for the post:
Brendan (Sun May 12, 2013 9:38 pm)
Rating: 5%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

Re: URGENT help on PIC16F1827

Postby JLeith » Mon May 13, 2013 3:49 am

Hi Martin,

The info was helpful in a positive mode I just was confused in seeing your output and wondering why I was not seeing the same results ?

Martin in the file what do you think is causing the "Clear_Board" to activate ?

I can follow the F* stepping thru the steps but I don't see where the "Clear_Board would activate when I hit Ball 1 and then Ball 2 clearing the Board is what would happen but not unless Button 8 is pressed.

I did a scope of Button 8 and it never goes high when button 1 is pressed ?

Now that the RS232 is running how does one isolate the steps.

At this point I will need your help to generate the HEX until I can purchase the PRO version. Today both of the ball games were rained out down 50 pounds.

I was looking at your image and Runtime: 272 Switch 64 Clear:1 Clear:2 and it repeats 3 times ? What caused your program to record that action?

Where do we go next ?

John

Brendan
Posts: 222
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 136 times
Been thanked: 115 times
Contact:

Re: URGENT help on PIC16F1827

Postby Brendan » Mon May 13, 2013 7:57 pm

Repeating myself but...

http://electronics.stackexchange.com/questions/4956/configure-a-pic-pin-for-input-and-output...

"Change the pin configuration every time. It's the TRIS register that controls if it's an input (1) or output (0). And, when you change direction, you have to wait a moment (check the datasheet) like a cycle or two before you use that pin."

Longer in your case as you're attempting to charge/discharge combined input/line capacitances via resistors from the switches. Port B remains an output until you're reading the port on the next instruction.

After processing outputs on Port B...

1 - Set port B to 0x0 to forcibly discharge line capacitance to deck where switches pull high.
2 - Wait 1ms (capacitance discharge interval)
3 - Change TRISB to input
4 - Allow the few clock cycles recommended above.
5 - Read Port B for switch input.

Wouldn't surprise me at-all if this were a bug in the works, but nothing less than proper good practice so as not to actively encourage issues.


Brendan
Last edited by Brendan on Mon May 13, 2013 9:02 pm, edited 2 times in total.
These users thanked the author Brendan for the post:
JLeith (Mon May 13, 2013 8:09 pm)
Rating: 5%
 

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

Re: URGENT help on PIC16F1827

Postby JLeith » Mon May 13, 2013 8:08 pm

Thank you Brendan,

Brendan
Posts: 222
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 136 times
Been thanked: 115 times
Contact:

Re: URGENT help on PIC16F1827

Postby Brendan » Mon May 13, 2013 8:10 pm

You're welcome John.

With Martin's expertise we'll crack it I'm sure :)


All the best,

Brendan

Brendan
Posts: 222
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 136 times
Been thanked: 115 times
Contact:

Re: URGENT help on PIC16F1827

Postby Brendan » Sat May 18, 2013 9:09 pm

Hello John.

Have you made further progress or observations?

Thanks in advance,

Brendan

Brendan
Posts: 222
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 136 times
Been thanked: 115 times
Contact:

Re: URGENT help on PIC16F1827

Postby Brendan » Fri Jun 07, 2013 9:19 pm

Hi John.
Is your system functioning now?

A successful resolution could help others facing similar issues in future.


All the best,

Brendan

User avatar
JLeith
Posts: 521
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 143 times
Been thanked: 26 times
Contact:

Re: URGENT help on PIC16F1827

Postby JLeith » Mon Sep 22, 2014 7:10 am

The main project is working great I have now a need to work on adding servo to flip my digits.

New world with Servo's

Thank you for all the help.

John