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: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: URGENT help on PIC16F1827

Post by JLeith »

Not here in Sunny Langley.
No LED and no output on the Laptop.

I will take the PCB out and see what gives.

Is the led receiving a ( 1 ) for on state or +5 ?

A3 should be pin 2 ?

A1 for the RS232 is Pin 18

John

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

JLeith wrote:Is the led receiving a ( 1 ) for on state or +5 ?
They are both the same. If A3 = 1 then it's = +5V (if that is what you meant?)
medelec35 wrote:A3 should be pin 2 ?
Yes thats correct.
JLeith wrote:A1 for the RS232 is Pin 18
That is also correct.

Have you got a meter you can measure voltages with?
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

Sounds like an hardware issue or program not correctly transferred to PIC?
To check the latter, can you read 16F1827 then post hex file please.


For anyone else who has ordered PL2303HX to USB TTL converter:
Drivers and datasheets can be found here:
http://prolificusa.com/pl-2303hx-drivers/


Martin
Martin

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Hui Martin,
Wonderful morning for a Baseball game. Doing some umpirining to make some funds for the new Flowcode.

Martin my PIC16F1827 is a PIC16F1827-I/P I do see there is other PIC16F1827 with suffix numbers.

Martin what number is your suffix on you PIC and can this be a problem ??

John

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

Re: URGENT help on PIC16F1827

Post by JLeith »

I have 4 PICs so I will try a different one and scope the leads.

John

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

JLeith wrote:Martin what number is your suffix on you PIC and can this be a problem ??
Same as yours -I/P

Did you read device and save hex file?
Martin

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

Re: URGENT help on PIC16F1827

Post by JLeith »

I will send you the HEX on PM

I have loaded another PIC.

I loaded the HEX then Erased the PIC and reloaded.

John

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

The hex file has not got any configuration parameters set.
So your programmer has not programmed fuses correctly.

Are you using MPLAB with Pickit2 or a stand alone program?

When you load hex file within programming software, you will need to check configuration settings.
Martin

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Hi Martin,

On your HEX file I used the PICKIT 2 program to Load the PIC on my Bread Board.

Now when the PIC loaded the PICKIT 2 came back Loaded Successful.

I will double check.

Yes it looks as if the PIC is not starting.

Here is the PIC state
PIC with new hex.jpg
PIC with new hex.jpg (24.93 KiB) Viewed 11889 times
Now what should I be looking for in the Config file with the PICKIT 2 ?

John

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Hi Martin,

I checked my May 7 Config in Flowcode
Config1 = 0X39A4
Config2 = 0X1FFF

I checked your file and it has the same Config settings.

I will make the PICKIT2 the same.

Back with more HEX

John

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

Re: URGENT help on PIC16F1827

Post by JLeith »

More Fun

For some reason PICKIT 2 wont let me program Config 2 to 0x1FFF

I'm going to see if I can find the PICKIT 2 program on my computer and see where is the Config file.

John
Attachments
PICKIT 2 CONFIG.jpg
PICKIT 2 CONFIG.jpg (69.57 KiB) Viewed 11888 times

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Found the missing BITS and set the Config File.

Martin send you the current HEX in PM.

John

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

Yep that looks better.

LED connected to port A3 Flashing yet after 5 seconds?
Martin

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Hello Martin,

The Sun is shinning and we have a heart beat.

The Led is flashing and when I send Ball 1 it pauses solid until the sequence completes and comes back to beating.

Now the next is I don't see the RS232 action ?

martin when I start the application it looks like it wants to do a phone line connection is there some where I can set it always to come to PORT 4.

I see on the bottom left 'Connected" but nothing on the screen. ?

I have a 7 Segment on the final output looking at the "ON" bits and I only see (B) (C) indicating a Ball 1 and when I ask for Ball 2 it sends out Ball 1.

Now we need or better me to see how to get the RS232 working.

Using Black to Ground and White to Pin 18 on PIC.

John

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

JLeith wrote:martin when I start the application it looks like it wants to do a phone line connection is there some where I can set it always to come to PORT 4.
Yes, at any time after you have created your new connection involving COM4, just click save.
Or you will be prompted to save when you 1st exit.
Your save file should appear in:
All Programs, Hyperterminal Private Edition, Hyperterminal Connections, Name of saved file.
For speed of loading you can right click on your save file and choose Send to Desktop.
medelec35 wrote:The Led is flashing and when I send Ball 1 it pauses solid until the sequence completes and comes back to beating.
Yes I can see why it pauses, I can alter code so it does not pause, otherwise it can be seen as chip resetting.
Can you scope A1 and make sure there a RS232 waveform present.
If there is it should look like this:
RS232 Waveform.png
(162.63 KiB) Downloaded 6793 times
You will need to se scope for trigger on -ve.
Take a look at the ringed part.
It shows 417.292us.
A quick calculation:
1/417.292E-06 =
2396.4
Therefore baud rate is nearly 2400.
Not bad for bit banged software control using internal osc at 32MHz.

Note: If your waveform is not exactly the same as mine then just measure width of narrowest parts.
Martin

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Hi Martin,

Where did you get a USBEE image from is that your Scope ?

I have copied your message and now off to downstairs to see if I can see the images.

John

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

JLeith wrote: Where did you get a USBEE image from is that your Scope ?
It's from Matrix Multimedia as well:
http://www.matrixmultimedia.com/product.php?Prod=EB070
I have PM'd you updated software version in which indicator LED does not pause when running code for Ball 1 etc.

Martin
Martin

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Thank you,

I tried and tried but I cant get an input to display on the laptop.

Here is the scope connection and I have to set it super fast and mv setting to get unsync garbage nothing smooth.
Attachments
PIC with scope.jpg
(70.83 KiB) Downloaded 2335 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

Can you try connecting an LED + resistor to RA1, and let me know what LED is doing please.
Martin

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Will do.

i just came to the PC to program the new hex and back to the basement.

I get exercise.

John

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Martin Led status.

The led is telling me the PORT RA1 is being help low and no indication of a HIGH.

On you setup with a led do you see see changes when you pulse a ball 1.

John

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

Re: URGENT help on PIC16F1827

Post by JLeith »

I took a reading with the RS232 cable disconnected and the Led indicated a LOW state

John

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Help if I put the led and resistor in the same breadboard slots.

I see a 1.2V to 1.6 volt pulse more or less. I thought at times it was following the heartbeat led but not in the same pattern.

No positive High Low as in you scope images.

I'm off to do another Baseball game umpiring to get a little closer to purchasing the Pro version
I make $25 pounds in a game or $40 Canadian

If you post a message you will be asleep hen I read it.
Current time: 4:45 pm

John

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: URGENT help on PIC16F1827

Post by medelec35 »

JLeith wrote:I see a 1.2V to 1.6 volt pulse more or less. I thought at times it was following the heartbeat led but not in the same pattern.
Where are you measuring 1.2V to 1.6V?
If on the scope, the on voltage level should be 5V and not much lower.
If across LED then that will be normal.

can you now take a screenshot of the whole of hyperterminal window please.
Also if you look at the call menu, is it just showing Disconnect?
If not you will need to select call.

The issue is either your settings or TTL to USB connections/Hardware.

You can keep the black wire connected, but try the green wire instead of white, just in case, but i'm fairly sure it is white that's required. (but you never know)
Martin

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

Re: URGENT help on PIC16F1827

Post by JLeith »

Hi Martin,

The weather just turned for the worst... Rain on Mothers Day and foretasted for 4 days. Giving me a liitle more time working on the project.

The reading was at the LED.

I could not get a stable reading with the scope.

I thought I could get a reading of TTL from the scope ?

I tried the Green wire and no luck.

I will send a snap shoot shortly.

is there a way to see if the cable will produce a reading ?

off to the basement to capture the Hyper terminal.

John

Post Reply