Chip works perfectly in simulation BUT........

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Chip works perfectly in simulation BUT........

Post by christoph »

AI SUPERSENDER X 88 FINAL - Copy.fcf
(9 KiB) Downloaded 438 times
Hi all,

I have a PIC16F88 producing a UART signal output which works perfectly in simulation but incorrectly on the breadboard. I am very much aware of all the usual problems and best practice and what is required for the correct operation of the arrangement in terms of components and power supply etc. My specific problem is that, only occasionally does it produce the correct output when the relevent input is made (de-bounced) but most of the time it comes up with a number which is NOT one of the 5 outputs required. HOWEVER, when I connect my Ika Logic Analyser, it works perfectly every time - in fact I ONLY need the -ve connection of the switched-on analyser to be connected to the breadboard -ve rail for it to work! The breadboard is stand alone with just the one chip, the necessary input/output resistors/capacitors and smoothed power supplyof 4.5volts (have run off battery supply to check it is not a problem with the PSU). If I feed the UART output signal into subsequent stages of the circuit (on another breadboard) the whole lot works perfectly on the occasional time that the F88 transmits a correct signal! I have experimented with various parameters and timing delays etc etc in Matrix and all sorts of component values and combinations on the breadboard, none of which have solved the problem. It is basically such a simple set up but I have run out of ideas and frustratingly, this is the only thing stopping everything else working

Can any one throw some light on what might get round the problem

Would be very grateful,

Regards,

Chris

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Chip works perfectly in simulation BUT........

Post by Benj »

Hi Chris,

First of all just checking that you have wired up your switches as shown here. e.g. with a resistor to set the default state so the pins are not floating when the switch is not pressed.
http://www.matrixtsl.com/wikiv7/index.p ... 2979cfc92e

Saying this as if more than one switch is pressed or floating high then none of your decisions will return true and you will repeatedly send out the switch value rather than the new value you actually want to send.

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi Ben, yes I have got the correct resistors in place for active high input and any further signal is ignored whilst power is maintained. I don't understand WHY such a simple circuit isn't working AND why it DOES work every time when I have the logic analyser or even just its -ve lead connected. I have checked everything through and tried various resitor and smoothing capacitor values from standard but always with the same result. Any clues from the fact it works with the analyser connected - I can't fathom it out electronically.

Would appreciate any further ideas or thoughts or things to try out..... :(

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Chip works perfectly in simulation BUT........

Post by medelec35 »

Hi Chris,
You are using the whole of port A for your input, yet you are only using 5 inputs.
I'm assuming your only using pull-ups or pull-downs on port A0 to A4 only?
Can you try masking off any unused inputs:
Masking.png
(41 KiB) Downloaded 17542 times
It looks like there could be interference from ports A5 to A7?

Martin
Martin

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi Martin/Benj,

Good thinking - I have an idea that I did start off with it like that a long time ago but I think I had some other problem at the time and reverted to the current situation which I have never changed so I will definitely try it out and let you know but will be Friday, owing to other commitments.

Thankyou for the suggestion - much appreciated.

Best regards,

Chris

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Oh and one other problem is that a short while ago it took so long to compile to hex and compile to chip that I realised something was obviously wrong but then discovered that these operations DID actually complete and ALWAYS SUCCESSFULLY but are taking about 5 minutes!! However, the programmed chips always work perfectly well in 'real life'. Unfortunately this is the case for ALL my Flowcode projects at the moment and I have failed to find the reason. I had not changed or updated anything on my computer and have a top anti virus package and even un-installed and re-installed Flowcode v4 and also tried a 'repair' but I still have the same problem. Any ideas?

User avatar
LeighM
Matrix Staff
Posts: 2052
Joined: Tue Jan 17, 2012 10:07 am
Contact:

Re: Chip works perfectly in simulation BUT........

Post by LeighM »

Hi Chris,
It would help to know details about your PC, the operating system? hard drive getting full?
Remember too that Windows does updates without your knowledge :roll:

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Chip works perfectly in simulation BUT........

Post by medelec35 »

Just had another thought.
If the above suggestions don't work.
As a test, just disabled all the decisions and send the value of the i/p directly via RS232.
The value will allow you to determine what pin is causing the issue.

Martin
Martin

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi Martin,
Yes you were correct - not using masking WAS the problem. It is now 100 % stable and correct every time. Many thanks.

I still have the problem of compiling to hex and chip, each taking 5 mins or more. Every time I pick one of my Flowcode projects it is coming up with a panel that basically says I have Flowcode on trial for a further 6 days and to go to the web and/or enter my key etc etc (which I have done a number of times but nothing changes). On the same panel it gives a countdown of 5 seconds and then shows 'ok' in the countdown box and I can only load my projects after I click on the 'ok'. This came about because I had these extended processing times at which point I contacted Matrix M and uninstalled Flowcode and followed the links which I was given for re-installation. I wonder if someone on the forum or Benj could help on this one.

Regarding your comments LeighM, yes I have plenty of space on the hard drive, I have refused to use Windows updates for a while now cos they have produced problems on occasions and my system is Vista 32 on what was a high spec computer but is a few years old now. However, I have no issues or problems with anything else on it and I run some quite hefty ones programs on it regularly and have a top anti-virus program so I really dont think it is a computer problem.

Help would be greatly appreciated - its driving me nuts!

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Chip works perfectly in simulation BUT........

Post by medelec35 »

Hi Chris,
Your welcome.
Glad hardware is working now.
I have a feeling it's software related.
For example Windows defender, firewall or antvirus.
If it was me I would disable them all to test. What antivirus and firewall if any are you running?
.
Martin

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi Martin, Thankyou for reply - I am running Bitdefendor Total Security 2016 and have done for several years. The current problem just came 'out of the blue' and doesn't appear to have affected any other programmes that I have tested, only Flowcode. I will try out your suggestion though and report back.......

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi Martin, It doesn't seem to have made any difference I'm afraid.

I feel it has something to do with the fact that every time I open a Flowcode drawing, I get a reminder panel coming up to say I have so many days to get activation code and to either a) put in the code (which I did to re-install Flowcode anyway) or b) go to the website (which takes me back to a redundant old Flowcode page (which it says is defunct) or c) wait for a count down of 5 secs and click 'ok' which gives me the correct item but with this impossible 5 minute processing time for hex and chip respectively. The inference is that I only have temporary access.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Chip works perfectly in simulation BUT........

Post by medelec35 »

Hi Chris,
christoph wrote:I feel it has something to do with the fact that every time I open a Flowcode drawing, I get a reminder panel coming up to say I have so many days to get activation code
Have you tried sending DavidA a PM as he may be able to send the key so FC4 can be fully registered?

I have just installed Flowcode V4 and entered pro version key.
So when it starts up it states I have 30 days to register.
Compiled AI SUPERSENDER X 88 FINAL - Copy.fcf and it took 8 seconds in total.
So as stated before either a third party is interfering or you can try reinstalling, after deleting any remaining files and registry entry for Flowcode V4.

Martin
Martin

User avatar
LeighM
Matrix Staff
Posts: 2052
Joined: Tue Jan 17, 2012 10:07 am
Contact:

Re: Chip works perfectly in simulation BUT........

Post by LeighM »

Hi Chris,
I've never used Vista, but I presume there is a windows monitor app that will tell you what process is hogging system resources during your minutes wait?

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi fellas, thanks for your help but now situation seems to have altered:-

Martin - I have un-installed and re-installed Flowcode v4 (using CD) and have now got rid of the reminder panel and is fully registered but now I cant compile at all because I get this message:-

Unable to compile C file using:
c:\program files\matrix multimedia\flowcodev4\boostc_pic16_flowcode.exe -v -t PIC16F88 "AI SUPERSENDER X 88 FINAL.c"

Check that the compiler location and options are correct. I don't know what to look for re 'locations' and options seem correct!

Hi LeighM - I'm not sure whether I still have the problem or not now but I not particularly computer literate and don't know how to check that out but at the moment I cant even compile to hex or chip now!

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Arghhh... just spent two and a half hours uninstalling, re-installing, checking and I am back to where I was - does compile to hex and chip BUT have the same 5 minutes processing time and it says unregistered and 30 days to go but I have been right through the whole process and even changed password and have had confirmation of the keys and password and all logged and accepted by the system. In the activation process it goes back to a Matrix page or error in big numerals which says 404 page not found and on the activation page, the two keys required have black and yellow bands on and say n/a (not applicable) and there is an orange-filled circle with an exclamation mark in it - all to to with activating the software as a registered product. I really dont have any idea how to get over this :(((

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Chip works perfectly in simulation BUT........

Post by Benj »

Hello,

In Flowcode v4 activation was a one time event. If you've already activated years ago then you don't need to do it again.

To get back running you need to follow this process.

Enter your original CD license key leaving the username field blank. This should activate the 30-day trial period.

Next enter your existing activation username and key, this should complete the process and fully unlock the software.

If your having problems then please send me a PM containing the keys you have available and I will investigate what you need to do to unlock the software.

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi Ben,

Yes that is what I have done but tried again and still not working. I DID get a panel which included the user name field but dont see that now, howeever, I used OKSCJ in there as oppose to leaving it blank. I have also tried every which way from the Flowcode reminder Panel and clicking 'OK' takes me to Flowcode Flow Charts existing or new 9which all have this 5 minute processing delay), clicking 'Enter Key' takes me to Register Flowcode panelwhich shows last group ofthe licence key correctly and after typing the whole thing in, it says "key is accepted, close and re-start Flowcode to complete process" but unfortunately there is no change and the register panel etc still re-appears every time I select a flowchart to work on and finally clicking 'Visit Website' takes me to"404, page not found" so I go to the current 'Homepage', where I get the same cycle start again.

OK - I think I need to send you the keys I have but I don't know how to send a PM containing them. If it is helpful, David Aldersley sent me an email containing all the information on 14th February 2014 14:34:23 but let me know how I send a PM if that will be easier.

Appreciate your help Benj

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Chip works perfectly in simulation BUT........

Post by Benj »

Hello Christoph,

To the right of my posts is a section about me and a number of buttons, one of which says PM. The PM button allows you to create a private message to me that only I can see.

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hope the PM worked Benj - looked like it went ok

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

I dont seem to be working the PM correctly but the latest I have is:-

Hi Benj,
OK, I have inserted the Flowcode CD and followed the instructions and used the new CD code and it accepted it and also accepted the old user and key details as you suggested and it is not putting up the 30 day reminder and goes straight into the flowchart like it should. However, it now displays the 'Unable to compile C file using: ...... the rest of it as detailed in the forum. Looks as though if this problem could be got round it might be sorted?

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi all,
I now have the registration sorted out but unfortunately Flowcode is now un-useable as I can't compile to hex or chip. I am sure I have had this problem in the distant past and have been searching through all my posts and right through the v4 and general forum posts but cannot find the solution - please can anyone help on this one as I have tried everything I can think of!

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Chip works perfectly in simulation BUT........

Post by Benj »

Hello Christoph,

Is it just one program that is failing to compile or any program? e.g. will a new blank flowchart compile?

If it's a specific program then please can you post the program and we will take a look for you.

If it's all programs that are failing to compile then can you send us the text generated by the compiler output window, there might be a hint there as to what is going wrong.

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

Hi Ben, It is all programs. Do you mean I open a programe, select compile to hex (say) and send you text of where it gets to?

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Contact:

Re: Chip works perfectly in simulation BUT........

Post by christoph »

This is the screen capture attachment
Attachments
Scrn capture when clicked compile to hex.jpg
(455.15 KiB) Downloaded 6879 times

Post Reply