Not sure how to delete double post, sorry...
First consider bypassing the internal Vref, check off and choose the
preassigned pin for that purpose.
Take a look at this - www.google.com/url
At 20 bits, a Vref of 1 V, one lsb is ~ 1 uV. Look at your power supply
and you will see 200 or more mV of noise, divide that by CMR at the
input buffer and you will start to see how much input referred noise
you have. Same applies to PSRR, errors additive for worst case peak
Most load cells are preconditioned with an IA.
Some useful info attached on IA's.
Thank you for the feedback. I read through the PDF, which is very applicable. The thing that bothers me is that this very silicon was working just fine before I lost my original program and started over.
I understand that most power supplies are not that reliable to the third digit of voltage. This is a high precision programmable supply, and my higher precision multimeter confrimed that the voltage was not drifting as the PSOC was saying, and that indeed 10mV was actually 10mV, not the 6mV reported by the microcontroller. I am going to have to see how my load cell behaves (since I do not have one with me unfortuantely).
What I do not understand about thgis is if the other software abnormalities (see above) have anything to do with this, or are a complete red herring. I am guessing the latter.
Any other ideas or feedback are greatly appreciated. I am working on this project for a friend, and would rather not let him down if I do not have to.
One reason for your problems will be that you do not wait for a completed ADC conversion done. At first you read after a delay with GetResult32(). There might be a conversion in progress. Later in your main() you again read with GetResult32() without a prior IsEndConversion(uint8 retMode).
BTW: To make things easier you may use an isr_StartEx(Handler) instead of isr_SetVector(Handler) and an isr_Enable();
For setting up C interrupts (page 13) -
http://www.cypress.com/?rID=38267 AN54460 - PSoC® 3, PSoC 4, and PSoC 5LP Interrupts
Other issues -
http://www.cypress.com/?rID=39677 AN57821 - PSoC® 3, PSoC 4, and PSoC 5LP Mixed Signal Circuit Board Layout Considerations
http://www.cypress.com/?rID=40247 AN58827 - PSoC® 3 and PSoC 5LP Internal Analog Routing Considerations
http://www.cypress.com/?rID=39974 AN58304 - PSoC® 3 and PSoC 5LP – Pin Selection for Analog Designs
Do you have a target resolution and accuracy you want for design ? Datasheet for the load cell....?
Thank you both once again for the suggestions.
The analog pins I am using are in the 'ideal' pin location in the P0 bank.
I started using Read32() instead of GetResults32(). Read32() waits for conversion to complete. I will need to get my hands on a load cell to see if indeed this works.
I am using the StartEx, but there is still an error in the software interface saying that 'expected function body after function declaration'. It does build, however.
I am still having the very annoying problem of the software not doing any sort of auto complete when I type, so that if I start typing a variable that I have delcared earlier, it will not auto complete and give me options, and it will also not give me a flag if I type the wrong name in so that i do not find out if all my syntax is correct until I build the program. Also if I start typing a component name, for example, the pin 'TARE', it does not show me the functions associated with it at all, and I have to try to remember all of the pin functions or open the datasheet for each component.
Can someone please download my project (attached to this post) and let me know if this is also a problem on a different PC/program. It is not fatal, but is very annoying and time consuming.
Load Cell2.zip 2.5 MB
With your program it compiles w/o any significant warnings.
I type "TARE" it does show me the functions, I type "Tare(" and shows me nothing.
Also tried typing several other variables, like buffer, could not find that either.
I did a clean and build, that changed nothing.
Your program is ":haunted", alien life force in it. You got me, no idea whats going on.
Creator 3.1 SP1
Maybe a uninstall/reinstall necessary of Creator ?
I suggest you to upgrade to Creator 3,1 using the update manager. Not perfect for PSoC3, but significantly better than 3.0
I cannot recommend Read32() because it starts and stops the ADC which is fine as long as you want a single read, but you are reading continuosly, so better use IsEndConversion() and GetResult32().
One other observation, the search process was very very slow when
attempting an autocomplete on your project, but "normal" on other
projects. Maybe dupe your project from scratch by cutting and pasting
code and re-drawing schematic....?
I have the same problems with Creator 3.1. As soon as I add a CY_ISR line, it does not give an error like Creator 3.0, but will not do any sort of autocompletes at all, which is very frustrating. When I delete the CY_ISR, it works as normal. This happens even when I start a new program from scratch.
It autocomed for me, but in lower case, which I thought odd.
I typed cy_isr; and no error showed up, until I compiled.
Sure seems that your installation is somehow hosed. Painful as it
is reinstall, but before you do erase all directories. You could also file
a CASE to see if there is a registry cleaning script available from
To create a technical or issue case at Cypress -
“Create a Case”
You have to be registered on Cypress web site first.