Page 1 of 1

Masking Problems??

Posted: Mon Jul 28, 2014 10:16 am
by JDR04
Hi Folks, for some reason I cannot get GP5 and GP2 to output at the same time when using the masking method. I can get them to output on their own.

I've checked to see the bits can be used as inputs or outputs. Would appreciate it if somebody would take a look and point out where I have gone wrong.

Thanks again......John

Re: Masking Problems??

Posted: Mon Jul 28, 2014 10:30 am
by JDR04
Sorry, forgot to mention that in the simulation the masking seems to work.

Thanks again.....John

Re: Masking Problems??

Posted: Mon Jul 28, 2014 10:48 am
by medelec35
Hi John,
Flowchart look fine to me except if you're using the internal oscillator?
What type of oscillator are you using (external crystal or internal).
So if you place two separate outputs, they both go on and off with the correct delays?
As a double check on things, what is the osc speed?


I have altered your flowchart for using with internal osc.
I have also changed the lower delay within your first loop (what about increasing the delays as 150ms as I thinks it's a visually short time), to match the other delay as 50ms is not long at all, so LED may look like it does not go off?
Tested your flowchart on 2 different external simulators, and all seems fine (although that's not 100% guarantee that all is fine of course).

If I have still got 12f683 at home will try on hardware.

If you're still having an issue can you post the hex file please.

Martin

Re: Masking Problems??

Posted: Mon Jul 28, 2014 3:01 pm
by JDR04
Thanks Martin, I'll give it go and see what happens.

Thanks a lot for your time John

Re: Masking Problems??

Posted: Mon Jul 28, 2014 3:21 pm
by JDR04
I tried it out but GP5 still wont come on at the same time as GP2.

I also checked with the scope and there is no signal at GP5 at all. Also tried a new chip but that did not work either.

Any ideas will be appreciated, Thanks.............John

Re: Masking Problems??

Posted: Mon Jul 28, 2014 6:37 pm
by JDR04
Sorry,forgot to post the hex file.

Re: Masking Problems??

Posted: Mon Jul 28, 2014 7:19 pm
by medelec35
Hi John, I have found my 12F683.
I used a hex file (attached to this post) compiled from last flowchart I posted and A5 is working as intended:
12F683 masking1.png
(204.5 KiB) Downloaded 4027 times
Can you load the attached file into your programmer, and see if it works an it does in the image.
Also have you got a circuit diagram as i believe your circuit does not match your hardware?
But I need to see a circuit to see if that is the case or not.
Or I will need to to answer the questions I have posted in a previous reply:
medelec35 wrote:What type of oscillator are you using (external crystal or internal).
So if you place two separate outputs, they both go on and off with the correct delays?
As a double check on things, what is the osc speed?
Also how have you connected pin4. Is it connected to +5V (via resistor) or is it left open circuit?

the other thing to try just for testing purposes is instead of a loop that has the count of 2, change it so it loops indefinitely.
Then keep monitoring why you sort the issue out.
.

Re: Masking Problems??

Posted: Mon Jul 28, 2014 7:49 pm
by JDR04
Hi Martin, tried opening the hex file you sent and got a message saying access was denied. Tried opening other hex files and got the same message??

Here are my other settings
Clock speed 4MHz
Using INTERNAL NO RC CLOCK setting.
PIN 5 is left open, nothing connected to it.

I have attached my schematic so far.

Any ideas why I cant open up the hex file???

Thanks again .....John

Re: Masking Problems??

Posted: Mon Jul 28, 2014 8:15 pm
by JDR04
Hi Martin, just to let you know I deleted the old hex file and dragged your one into the folder. Then burnt the chip and it worked...well almost,I just got excited when I saw the LED flash twice with the buzzer. Man I'm turning into a flowcode addict.

The only thing now is the LED after the first initial two activations keeps comming on for a 1 second duration and does not stop???

Any ideas on this and what you think went wrong initially???

Thanks a lot...John

Re: Masking Problems??

Posted: Mon Jul 28, 2014 8:17 pm
by medelec35
JDR04 wrote:tried opening the hex file you sent and got a message saying access was denied. Tried opening other hex files and got the same message??
So you loaded the programming software up then used programming software to load or import hex files?
The reason for access denied could be either hex file is opened by something else or files are stroed in a protected area and programming software does not have privileges to open file.
Or hex files are being quarantined as there maybe viruses on your pc.
Maybe just restarting your PC could help?
Just try loading programmer up, and import hex file rather than double click on hex file itself.
To be honest I don't know the true answer.
JDR04 wrote:Using INTERNAL NO RC CLOCK setting.
This is the configuration settings from the hex file you posted:
12F683 masking1 config settings..png
(23.71 KiB) Downloaded 4014 times
These are the default settings.
As you can see:
1)osc set to external. It should be set to internal
2) Master Clear is set to enabled. It should be on disabled.
Like this:
12F683 masking1 config settings 2.png
(93.24 KiB) Downloaded 4014 times
Unless you change your configuration setting your hardware won't work.
I'm very supprised it did with:
JDR04 wrote: I can get them to output on their own.
since master clear was not at 5V, nothing should have worked at all!

Martin

Edit, was typing this while you posted your reply, but it does still apply to you.
JDR04 wrote:The only thing now is the LED after the first initial two activations keeps comming on for a 1 second duration and does not stop???
If your hardware is same as circuit then the problem will be down to missing pots.
The inputs on the microcontroller (that pots should be connected to will be floating.
So any electrical noise will be converted into a value.
You can confirm this by right clicking on both ADC components, select Disable icon
Make sure configurations are set correctly.
Recompile to hex.

Re: Masking Problems??

Posted: Mon Jul 28, 2014 10:01 pm
by JDR04
Thanks again Martin. Will have another go tomorrow and let you know the results.

Thanks a ton for your time on this...John