Putting a PIC16F88 into and out of sleep mode
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Thankyou Benj,
Here is attachment
Here is attachment
- Attachments
-
- NEW_16F1823-CHIP.fcf
- (15 KiB) Downloaded 517 times
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Hi Benj,
PLEASE USE THIS ATTACHMENT to look at but it still wont compile unfortunately...
Chris
PLEASE USE THIS ATTACHMENT to look at but it still wont compile unfortunately...
Chris
- Attachments
-
- C_code_semicolon_added_to_NEW_16F1823-CHIP.fcf
- (11 KiB) Downloaded 522 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting a PIC16F88 into and out of sleep mode
Hi Chris,
Right the compile errors regarding the interrupt have now been fixed in this updated definition file.
You need to copy this file to your "C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD" directory and restart Flowcode.
There is also a compilation error regarding your oscon C code.
This needs changing from oscon to osccon, i.e. two c's and then this should work also.
Right the compile errors regarding the interrupt have now been fixed in this updated definition file.
You need to copy this file to your "C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD" directory and restart Flowcode.
There is also a compilation error regarding your oscon C code.
This needs changing from oscon to osccon, i.e. two c's and then this should work also.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Hi Benj,
Have done all that but it still wont compile or pick up the INTERRUPT to the Macro in simulation, instead it comes up with 13 'paragraphs' (for want of a better description) of errors and ending in code 1......see the first attachment for last part but all the previous is similar.
I would just mention - if it is significant - that you said copy the File to "C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD" which it has but I dont 'see' the(x86) there??
This is all very wierd because a chart attachment ADDED TO MY FOLLOWING POST is my original one which DOES work (apart from sleep which doesn't simulate) but I cant use it because it only has 4 available IOC and anyway is far too big for the PCB which is why I need THIS 1823 chip.
Have done all that but it still wont compile or pick up the INTERRUPT to the Macro in simulation, instead it comes up with 13 'paragraphs' (for want of a better description) of errors and ending in code 1......see the first attachment for last part but all the previous is similar.
I would just mention - if it is significant - that you said copy the File to "C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD" which it has but I dont 'see' the(x86) there??
This is all very wierd because a chart attachment ADDED TO MY FOLLOWING POST is my original one which DOES work (apart from sleep which doesn't simulate) but I cant use it because it only has 4 available IOC and anyway is far too big for the PCB which is why I need THIS 1823 chip.
- Attachments
-
- PIC16F1823_Print_out_of_last_four_paragraphs_of_thirteen_paragraphs_of_errors.jpg
- (395.82 KiB) Downloaded 5667 times
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
This is the chart that works ok - see attachment
- Attachments
-
- BRAND NEW 16F883 TRANSMITTERy.fcf
- (11 KiB) Downloaded 549 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting a PIC16F88 into and out of sleep mode
Hmm, Just tried it here and it's compiling correctly for me.
Are you using Flowcode 4.5?
Flowcode v4 is now well out of support so I can't spend too much time on this but will do my best to help you to get it working.
From your error messages it looks like the compiler does not have any of the registers declared. Maybe the compiler in your version does not support the chip or an include is not being included correctly. Compare your C file with mine using a text editor, are there differences?
Are you using Flowcode 4.5?
Flowcode v4 is now well out of support so I can't spend too much time on this but will do my best to help you to get it working.
From your error messages it looks like the compiler does not have any of the registers declared. Maybe the compiler in your version does not support the chip or an include is not being included correctly. Compare your C file with mine using a text editor, are there differences?
the (x86) in the path is something added by Microsoft on 64-bit computers to help signify legacy 32-bit programs.I would just mention - if it is significant - that you said copy the File to "C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD" which it has but I dont 'see' the(x86) there??
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Hi Benj,
I have Flowcode 4 version 4.3.7.63 dated 2010
I don't know how to compare files but will have a look on the web or if you can tell me what is a free one if I need to download something.
What is a way out of this - can I upgrade to a 4.5 so that I dont make all my current charts unuseable?
I really need that chip...
I have Flowcode 4 version 4.3.7.63 dated 2010
I don't know how to compare files but will have a look on the web or if you can tell me what is a free one if I need to download something.
What is a way out of this - can I upgrade to a 4.5 so that I dont make all my current charts unuseable?
I really need that chip...
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting a PIC16F88 into and out of sleep mode
You could try Help -> Check for updates, this still seems to be working for v4.
I think this is the direct v4.5 link.
http://www.matrixmultimedia.com/softwar ... codeV4.exe
I think this is the direct v4.5 link.
http://www.matrixmultimedia.com/softwar ... codeV4.exe
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Oh - that seems to have 'killed' v4. The 1823 chart is now missing the RS232 and ALL the components like comms, LED's, Switch arrays etc etc are all saying "unregistered" now!
HELP!
HELP!
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
When I click on help in Flowcode it has never appeared to work but a windows panel basically says it isn't supported so I cant do anything 'there'.
It Does now say it is v4.5,18,74 so that HAS changed.
It Does now say it is v4.5,18,74 so that HAS changed.
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Now it has gone full circle and although I put in the Licence key and it SAYS it is recognised and all ok, when I pick any chart, everything is still unregistered. I had this problem at the beginning of all these other problems so I am now back to totally unuseable. I know this is v4.5 but I still need to use it. Trouble is it comes up with the message in the attachment and that is from when I click to enable the registration and the only other selection is the web and that takes me to an error page 404 which takes me into all MM's latest things and ultimately nowhere.
I really need to get this sorted urgently - cant I just re-register from scratch with the 4.5,18,74 version without any reference to what went before cos the seems to be conflicting actions creeping into this
I really need to get this sorted urgently - cant I just re-register from scratch with the 4.5,18,74 version without any reference to what went before cos the seems to be conflicting actions creeping into this
- Attachments
-
- When I try to register.jpg
- (184.41 KiB) Downloaded 5655 times
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
OK, I have now 'repaired' Flowcode and it is now showing the components when clicked on but each time I bring up a chart it brings up the panel quoting I have 30 days to register etc. so may not be giving me full access/!
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting a PIC16F88 into and out of sleep mode
Hi Chris,
Registration is a two part process.
First you must enter your CD key which unlocks the 30 day usage.
You must then follow up with your existing username and key from when you activated Flowcode 4. It should be in your emails still.
If not then let me know and I can dig out your activation details for you.
Registration is a two part process.
First you must enter your CD key which unlocks the 30 day usage.
You must then follow up with your existing username and key from when you activated Flowcode 4. It should be in your emails still.
If not then let me know and I can dig out your activation details for you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Hi Benj,
I HAVE all my 'Flowcode V4 for PIC details i.e. 6-part Licence/CD Key (ending XCUFY2) and my 7-part Licence/CD Key (ending with ZEWXJQ).
The problem every time is that when the 'Flowcode reminder' panel comes up, I click on 'Enter Key' and it comes up with the 'Error' panel which I show in previous posting attachment.
Therefore I am left with the 'OK' button on the 'Reminder' panel which when I click, simply allows the chart to come up OR the Visit Website button which takes me to a Matrix M. page which says '404 Page Not Found' in huge lettering followed by the statement: "There's nothing here...but what you seek may still exist elsewhere...try these links to find what you are looking for or use the search bar at the top of the page". The first option simply takes me back to all your latest things which doesn't get me anywhere.
I HAVE all my 'Flowcode V4 for PIC details i.e. 6-part Licence/CD Key (ending XCUFY2) and my 7-part Licence/CD Key (ending with ZEWXJQ).
The problem every time is that when the 'Flowcode reminder' panel comes up, I click on 'Enter Key' and it comes up with the 'Error' panel which I show in previous posting attachment.
Therefore I am left with the 'OK' button on the 'Reminder' panel which when I click, simply allows the chart to come up OR the Visit Website button which takes me to a Matrix M. page which says '404 Page Not Found' in huge lettering followed by the statement: "There's nothing here...but what you seek may still exist elsewhere...try these links to find what you are looking for or use the search bar at the top of the page". The first option simply takes me back to all your latest things which doesn't get me anywhere.
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
After many hours trying various things I decided to re-install Flowcode via my account where everything 'lines up' correctly like keys and user names etc. and I can now compile BUT:
1) It is taking up to 6 minutes!
2) As you can see, it is STILL saying UNREGISTERED.
3) I dont understand the cautions, much less what to do about them - perhaps you could either tweak the last Flowchart I attached since you were saying that it did work in your case or at least let me know what to do myself for any significant ones so that I know in the future.
4) Every time I open a flowchart I get am still getting 'User Account Control' panel saying "unidentified program etc." and I have to click to allow / then 'Reminder' panel where I have to click 'ok' because if I try to click on 'Enter Key' I get the violation panel / so 'ok' and into drawing.
5) The interrupt is STILL saying PORT B but you were saying that should work ok on hardware and thankfully there IS PORT C in the ports list now BUT (see item 6)....
6) PORTS LIST shows a PORT B as well, is this a problem?
7) It STILL WILL NOT SIMULATE like the F883 attachment I posted DOES even on my PC and always has, so what could be the difference as all my compilation and config. files are the same!??
Maybe you can see tell what is going on from the compile attachments. I couldn't get two attachments into the same post last time I wanted to so I may have to do 2 postings to send the end of the compile file.
1) It is taking up to 6 minutes!
2) As you can see, it is STILL saying UNREGISTERED.
3) I dont understand the cautions, much less what to do about them - perhaps you could either tweak the last Flowchart I attached since you were saying that it did work in your case or at least let me know what to do myself for any significant ones so that I know in the future.
4) Every time I open a flowchart I get am still getting 'User Account Control' panel saying "unidentified program etc." and I have to click to allow / then 'Reminder' panel where I have to click 'ok' because if I try to click on 'Enter Key' I get the violation panel / so 'ok' and into drawing.
5) The interrupt is STILL saying PORT B but you were saying that should work ok on hardware and thankfully there IS PORT C in the ports list now BUT (see item 6)....
6) PORTS LIST shows a PORT B as well, is this a problem?
7) It STILL WILL NOT SIMULATE like the F883 attachment I posted DOES even on my PC and always has, so what could be the difference as all my compilation and config. files are the same!??
Maybe you can see tell what is going on from the compile attachments. I couldn't get two attachments into the same post last time I wanted to so I may have to do 2 postings to send the end of the compile file.
- Attachments
-
- FIRST_PAGE_SCREEN_SHOT_of_6_MINUTE_COMPILATION_.jpg
- (367 KiB) Downloaded 5642 times
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Second attachment re compile...
- Attachments
-
- SECOND_PAGE_SCREEN_SHOT_of_6_MINUTE_COMPILATION.jpg
- (351.81 KiB) Downloaded 5642 times
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Hi Benj or anyone from the MM team,
I know you guys are busy but I am stuck with two priority problems that are specifically to do with REGISTRATION and the Flowcode-LISTED CHIP ( the PIC16F1823 ) which does'nt simulate whereas the PIC16F887 DOES!
I have no control over either of these factors as they are controlled within Flowcode and Matrix Multimedia administration respectively but nevertheless, I have spent the last TWO days trying everything from the postings, the web and my gathered information to no avail. I did a complete computer check over the weekend including defrag. and it is all perfect and running fast so I know these issues are not a PC problem - besides, all my other programmes run exactly as they should. I have compared the files you sent me Benj and they match ok.
RegMe.exe does not recognise my activation code - please see following attachments
I am desperately trying to finish this project within a limited time period but I cannot move at all now....!
I would also like to find out why it takes 6 minutes to to compile and download to chip and get the other answers to my items list shown on the recent posting.
Many thanks in advance and would be really grateful to get all these fixed today,
Chris
I know you guys are busy but I am stuck with two priority problems that are specifically to do with REGISTRATION and the Flowcode-LISTED CHIP ( the PIC16F1823 ) which does'nt simulate whereas the PIC16F887 DOES!
I have no control over either of these factors as they are controlled within Flowcode and Matrix Multimedia administration respectively but nevertheless, I have spent the last TWO days trying everything from the postings, the web and my gathered information to no avail. I did a complete computer check over the weekend including defrag. and it is all perfect and running fast so I know these issues are not a PC problem - besides, all my other programmes run exactly as they should. I have compared the files you sent me Benj and they match ok.
RegMe.exe does not recognise my activation code - please see following attachments
I am desperately trying to finish this project within a limited time period but I cannot move at all now....!
I would also like to find out why it takes 6 minutes to to compile and download to chip and get the other answers to my items list shown on the recent posting.
Many thanks in advance and would be really grateful to get all these fixed today,
Chris
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting a PIC16F88 into and out of sleep mode
Hello Chris,
The activation code you're entering should also have a username.
e.g. in the text field enter the details like this.
Username
Activation Code
Let me know if this works.
Also please don't post your keys on a public forum. Apart from piracy issues if you ever wanted to upgrade and claim your discount someone may already have claimed it.
The activation code you're entering should also have a username.
e.g. in the text field enter the details like this.
Username
Activation Code
Let me know if this works.
Also please don't post your keys on a public forum. Apart from piracy issues if you ever wanted to upgrade and claim your discount someone may already have claimed it.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Sorry Benj but I not sure where you mean as not on the reg panel - I have seen a place for the user name if I am removing Flowcode and then re-installing it - is that where you mean? If so, then it is already there correctly but I can go through the process again.
I guess you removed the last postings! - I agree!
Chris
I guess you removed the last postings! - I agree!
Chris
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting a PIC16F88 into and out of sleep mode
Hi Chris,
In the activation code window that you showed in your screen shot simply type your username and activation key on individual lines in the same text field.
Username
Activation key
e.g. don't uninstall again. Just go to the activate window and input your details into the activation text box.
The "Name = " and "Code = " are not needed.
just:
Name
Code
Let us know how you get on.
In the activation code window that you showed in your screen shot simply type your username and activation key on individual lines in the same text field.
Username
Activation key
e.g. don't uninstall again. Just go to the activate window and input your details into the activation text box.
The "Name = " and "Code = " are not needed.
just:
Name
Code
Let us know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Hi Benj, yes fully registered again at last, thankyou for that.
I am left with the problem of the PIC16F1823 interrupt not switching when any one of the switches RA0,1,2,4 or 5 is operated. ( I am using RA3 for MCLR 'tied' to +ve ).
In desperation I have compared C code for this 16F1823 flowchart with the 16F883 flowchart (where the interrupt works like a dream and the operating principle is exactly the same) and changed obvious things such as PORT B to Port A where required but it was virtually all identical.
The only part I wasn't sure about on 16F1823 was probably the important part near the end of the coding under the Interrupt 'Enable PORT A' heading. There are 4 lines e.g. first line 'ioca = ioca (I cant replicate the vertical bar) 0xc0 etc which I don't understand - shouldn't there be 6 lines for the 6-IOC capability the chip has (and what happens about the fact that I am using one of them, RA3 for MCLR?).
I think all it requires is a quick look at the the 'Interrupt' with the benefit of your expertise to fix it. I have attached the two relevent flowcharts.
Can you give me some ideas as to what to try to overcome the 6 or more minutes it takes to compile and also send to chip.
Then I can stop bothering ya Benj - I know we are all busy - but I need to catch up with this 'like yesterday' as the saying goes.
Thanks,
Best regards,
Chris
I am left with the problem of the PIC16F1823 interrupt not switching when any one of the switches RA0,1,2,4 or 5 is operated. ( I am using RA3 for MCLR 'tied' to +ve ).
In desperation I have compared C code for this 16F1823 flowchart with the 16F883 flowchart (where the interrupt works like a dream and the operating principle is exactly the same) and changed obvious things such as PORT B to Port A where required but it was virtually all identical.
The only part I wasn't sure about on 16F1823 was probably the important part near the end of the coding under the Interrupt 'Enable PORT A' heading. There are 4 lines e.g. first line 'ioca = ioca (I cant replicate the vertical bar) 0xc0 etc which I don't understand - shouldn't there be 6 lines for the 6-IOC capability the chip has (and what happens about the fact that I am using one of them, RA3 for MCLR?).
I think all it requires is a quick look at the the 'Interrupt' with the benefit of your expertise to fix it. I have attached the two relevent flowcharts.
Can you give me some ideas as to what to try to overcome the 6 or more minutes it takes to compile and also send to chip.
Then I can stop bothering ya Benj - I know we are all busy - but I need to catch up with this 'like yesterday' as the saying goes.
Thanks,
Best regards,
Chris
- Attachments
-
- BRAND NEW 16F883 TRANSMITTER.fcf
- (15 KiB) Downloaded 465 times
-
- NEW_16F1823_CHIP - Copy.fcf
- (11 KiB) Downloaded 547 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting a PIC16F88 into and out of sleep mode
Hi Chris,
I take it this is in simulation. V4 only had limited simulation of interrupts so this could explain what you are seeing. The simulation may only work for PortB but the downloaded code should work as expected. Have you tried this on hardware?PIC16F1823 interrupt not switching when any one of the switches RA0,1,2,4 or 5 is operated.
If you look at the chip datasheet then it will explain the IOCA register for you. If the MCLR is in MCLR mode then it's basically disconnected from the PortA registers so won't trigger an interrupt.There are 4 lines e.g. first line 'ioca = ioca (I cant replicate the vertical bar) 0xc0 etc which I don't understand - shouldn't there be 6 lines for the 6-IOC capability the chip has (and what happens about the fact that I am using one of them, RA3 for MCLR?).
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Hi Benj,
I didn't want to get to hardware before clearing up the fact that F883 simulates and so why doesn't F1823 - so that's cleared that up with your explanation now.
Yes I have the full set of F1823 data sheets and although I understand the 'words' and the 'working' I do not know how it translates into C code. What DOES "ioca = ioca (I cant replicate the vertical bar) 0xc0" mean? I could probably work the rest out from that then. The hex value of 0xc0 didn't seem to match any conversion into decimal/binary/octal that I could relate to and same on the other 3 lines. COULD YOU EXPLAIN THAT LINE for me?
Then I can breadboard and check it out.
Many thanks,
Chris
I didn't want to get to hardware before clearing up the fact that F883 simulates and so why doesn't F1823 - so that's cleared that up with your explanation now.
Yes I have the full set of F1823 data sheets and although I understand the 'words' and the 'working' I do not know how it translates into C code. What DOES "ioca = ioca (I cant replicate the vertical bar) 0xc0" mean? I could probably work the rest out from that then. The hex value of 0xc0 didn't seem to match any conversion into decimal/binary/octal that I could relate to and same on the other 3 lines. COULD YOU EXPLAIN THAT LINE for me?
Then I can breadboard and check it out.
Many thanks,
Chris
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Putting a PIC16F88 into and out of sleep mode
Hi Chris,
this line of code takes the value in the ioca register and performs a bitwise OR on the register.
e.g. if ioca is equal to 0x01
then the line ioca = ioca | 0xc0; would end up with ioca equal to 0xc1.
0b00000001
OR
0b11000000
=
0b11000001
The | symbol is on the same key as the \ symbol i.e. next to the Z key.
For more information on C operators see this page.
http://www.tutorialspoint.com/cprogramm ... rators.htm
Code: Select all
ioca = ioca | 0xc0;
e.g. if ioca is equal to 0x01
then the line ioca = ioca | 0xc0; would end up with ioca equal to 0xc1.
0b00000001
OR
0b11000000
=
0b11000001
The | symbol is on the same key as the \ symbol i.e. next to the Z key.
For more information on C operators see this page.
http://www.tutorialspoint.com/cprogramm ... rators.htm
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 382
- Joined: Tue Nov 01, 2011 4:28 pm
- Has thanked: 196 times
- Been thanked: 26 times
Re: Putting a PIC16F88 into and out of sleep mode
Hi Benj,
Ahhh... sorry I have that vertical bar ALSO on the key that is below the escape key but as a third icon and didn't spot that elsewhere - thankyou!
Many thanks re the ioca explanation, I'm now fired up and can work with that!
Many thanks,
Chris
Ahhh... sorry I have that vertical bar ALSO on the key that is below the escape key but as a third icon and didn't spot that elsewhere - thankyou!
Many thanks re the ioca explanation, I'm now fired up and can work with that!
Many thanks,
Chris