- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot use two muxes one after the other. Best solution for you will be to increase the number of channels for the ADC and remove the hardware mux.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My crystal ball is out of order ;-), so can you tell me what does not work?
As a general tip: The sequencing ADC will scan all its enabled sources (one after the other) with a single call. So there is no need to manually select one input after the other.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried without it but same result. Value is 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Designing binary: Runs or doesn't run 😉
What values have
static int32 temperature
int32 thermistorResistance
int16 referenceVoltage
int16 thermistorVoltage
int16 offsetVoltage
at end of ProcessTemperature()
and which kit are you using? CY8CKIT-0???
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1.
2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CY8CKIT ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Channel 2 of the ADC is connected to Ground so it will always read 0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bobgoar you right it`s always 0 but work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The program you sent only prints out one reading Temperature=25 on my system. The window you sent in the last post is printing out 4 additional readings. The code for this is not in the program you sent. Have you modified the program? Please send the latest revision that you have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I needed the kit's number because some of the GPIOs are connected to caps for special use. Wanted to make sure you didn't use one of them.
Your referenceVoltage being zero is a bug. Check that with a voltmeter. Probably a bad/broken connection.
@Bob(goar) That shorted connection to GND is OK. The ADC value from this channel is used to cancel any offsets. Quite useful when converting to 16 bits and more, but the effect at 12 bit resolution might be rather small (Zero).
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use Pioner Kit as in PDF :CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit
I run this 2 projects on same kit and same hardware and same PC. Example with Mux is worked, changed to use ADC is not.
I think that man did this example used some trick because not was reason to add Mux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gurus !
Anybody knows what a problem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You are missing one important point. The temperature.c file is used for the calculation in the project with mux. In which the mux channel is varied for each calculation. If you are trying to remove the mux component, you have to write similar code for ADC. Replacing the hardware will not do the job.
Holmes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you saw my code ? Seems to me not.
Because you`l see this strings :
//AMuxSeq_Next();
ADC_SetChanMask(channel );
as you can see Mux used for switch channels and I used for this ADC swap possibility.
If you think it`s not right please change it and I`l happy to check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think the issue is with giving the inputs directly to ADC and their drive mode. The pins cannot be software driven and AMUXA/AMUXB connected at the same time as per HSIOM register values. With the setup you have done it may not be possible.
I assume that your requirement was to measure one external voltage along with the temperature from the code you have given. I added one more channel to the external mux and have implemented that. This should solve your problem.
Note: Measure channel input 2nd terminal is connected to ground pin p3[2] currently. You may change it according to your need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks ! I`l check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Holmes ! It`s work as need .