- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've attached the project bundled file. please look into it and tell me where it goes wrong.
Thank you
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I presume: CY8CKIT-042 BLE Pioneer Kit. Port 3 pin 4 might be used internally as I2C_SDA for the I2C-UART bridge, see schematics. Try another input (port 3 pin 0 at J2 pin 1)
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
Thank you, Bob,
1.Still, there are no Values in ADCout. (step execution in debug mode)
2. I couldn't understand why you write Wait(x) At ln16 and what is its use there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ADC will not work correctly when debugging. Just let the program run and then click a breakpoint at the assignment ADCout = ... You will see the value of the previous conversion. I cannot see where the input voltage comes from. Schematic??
No value needs explanation, every value can be valid. So what shows ADCout?
Wait() is just for readability, everyone will see that your program waits for something to happen.
while(); // will cast a warning
while()
{
} // Needs 3 lines instead of one
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ADCout shows 0x00000... value.
And the schematic is a voltage divider network with an LDR and Resister. The analog IP is taken from the Node. Vref 3.3v
Thank You Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which Cypress development kit are you using? CY8CKIT-0?? <- number??
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using 042
Uc is cy8c4247lqi-bl-483
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cy8c4247lqi-bl-483t is the PSoC chip, the board (pcb) when a cypress one starts with CY8CKIT-
Or what kind of board are you using?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the CY8CKIT-042 Pioneer Baseboard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I presume: CY8CKIT-042 BLE Pioneer Kit. Port 3 pin 4 might be used internally as I2C_SDA for the I2C-UART bridge, see schematics. Try another input (port 3 pin 0 at J2 pin 1)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Bob,
I understand, But When I'll needing 4-5 ADC that time will i be able to use the P3.4 and P3.5? I guess its multiplexed with the I2C proto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
^There are some more pins to use for ADC, don't worry. At this time you need to get one pin to work. The step to n+1 is then much easier. I still miss the schematic of LDR and Resistor you use. Did you already see that you can do that in topdesign using the off-chip components? Just enable "External terminal" checkbox of your Ain pin. Then connect LDR, resistor GND and VCC
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
You are still on Port3 pin 4
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just checked: Because you do not do anything with your variable ADCout the compiler has optimized-out the assignment.
Use Project -> Build Settings -> ARM GCC -> Compiler -> Optimization: and set Optimization level to "none", then rebuild the project. Now the value will get stored in ADCout.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
Sorry to interfere but you said something about the port 3 pin 4 and 5 which are internally assign to I2C interface. I have made a custom PCB because I needed the port 3 pins 4,5 and also 6,7( which are on the RGB led) but still have problems with 4,5 pins. Shouldn't they be connected to I2C only when the chip is put on the development board?
Also I used the Port 4 pins 0 and 1. I do not observe strange behavior yet but I may ask, and this may be useful also for this post: Is there any problem to use all 8 pins of Port 3 + Port 4: 0,1 pins? I do not received any errors but I did not validate the ADC values yet either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Marian-Emanuel
I was referring to the Cypress Kit CY8CKIT-042 BLE Pioneer kit which uses some of the PSoC's pins for UART or I2C bridging, Capsense etc. On a self designed board there are no restrictions of using Port3. Port 4 pins are restricted in routing, they can be used under firmware control but it is not possible to route them internally.
Can you please explain what problems you have got with the P3_4 and P3_5 pins? And can you post a project showing that issue?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Marian Emanuel
Very agreed with you. it's a development board then why we can't use P3.4&5 for ADC.
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey bob thank you, I can see the ADC reading in ADCout by using P3.0.