Page 5 of 5

Re: URGENT help on PIC16F1827

Posted: Sun May 12, 2013 9:07 pm
by JLeith
The Scoreboard must like Mothers Day.

Hyper Terminal worked the 1st time.

Martin I sent some files on your PM.

John

Re: URGENT help on PIC16F1827

Posted: Sun May 12, 2013 9:32 pm
by medelec35
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:
http://www.matrixmultimedia.com/mmforum ... 219#p21219

Martin

Re: URGENT help on PIC16F1827

Posted: Mon May 13, 2013 3:49 am
by JLeith
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

Re: URGENT help on PIC16F1827

Posted: Mon May 13, 2013 7:57 pm
by Brendan
Repeating myself but...

http://electronics.stackexchange.com/qu ... 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

Re: URGENT help on PIC16F1827

Posted: Mon May 13, 2013 8:08 pm
by JLeith
Thank you Brendan,

Re: URGENT help on PIC16F1827

Posted: Mon May 13, 2013 8:10 pm
by Brendan
You're welcome John.

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


All the best,

Brendan

Re: URGENT help on PIC16F1827

Posted: Sat May 18, 2013 9:09 pm
by Brendan
Hello John.

Have you made further progress or observations?

Thanks in advance,

Brendan

Re: URGENT help on PIC16F1827

Posted: Fri Jun 07, 2013 9:19 pm
by Brendan
Hi John.
Is your system functioning now?

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


All the best,

Brendan

Re: URGENT help on PIC16F1827

Posted: Mon Sep 22, 2014 7:10 am
by JLeith
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