Masking Problems??
Moderator: Benj
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Masking Problems??
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
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
- Attachments
-
- 12F683 Datasheet.pdf
- (2.9 MiB) Downloaded 363 times
-
- Auto Lightby Martin 1.1.fcf
- (12 KiB) Downloaded 233 times
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: Masking Problems??
Sorry, forgot to mention that in the simulation the masking seems to work.
Thanks again.....John
Thanks again.....John
-
- 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: Masking Problems??
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
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
- Attachments
-
- Auto Lightby Martin 1.1.fcf
- (12.5 KiB) Downloaded 246 times
Martin
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: Masking Problems??
Thanks Martin, I'll give it go and see what happens.
Thanks a lot for your time John
Thanks a lot for your time John
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: Masking Problems??
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
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
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: Masking Problems??
Sorry,forgot to post the hex file.
- Attachments
-
- Auto Lightby Martin 1.2.hex
- (1.96 KiB) Downloaded 214 times
-
- 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: Masking Problems??
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: 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:
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.
.
I used a hex file (attached to this post) compiled from last flowchart I posted and A5 is working as intended: 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:
Also how have you connected pin4. Is it connected to +5V (via resistor) or is it left open circuit?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?
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.
.
- Attachments
-
- Auto Lightby Martin 1.1.hex
- (1.96 KiB) Downloaded 226 times
Martin
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: Masking Problems??
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
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
- Attachments
-
- Auto light 8 SCH.jpg (9.85 KiB) Viewed 6691 times
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: Masking Problems??
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
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
-
- 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: Masking Problems??
So you loaded the programming software up then used programming software to load or import hex files?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??
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.
This is the configuration settings from the hex file you posted: These are the default settings.JDR04 wrote:Using INTERNAL NO RC CLOCK setting.
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: Unless you change your configuration setting your hardware won't work.
I'm very supprised it did with:
since master clear was not at 5V, nothing should have worked at all!JDR04 wrote: I can get them to output on their own.
Martin
Edit, was typing this while you posted your reply, but it does still apply to you.
If your hardware is same as circuit then the problem will be down to missing pots.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???
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.
Martin
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: Masking Problems??
Thanks again Martin. Will have another go tomorrow and let you know the results.
Thanks a ton for your time on this...John
Thanks a ton for your time on this...John