Pin Assignement

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JulianLBTK
Level 1
Level 1
10 sign-ins 5 likes given 5 sign-ins

Hi everyone... I'm working with the DS18B20 temperature sensor and I'm using One-Wire Protocol,  the project is working well but I have a question:

Why when I use any of the following pins: P0[2],  P0[3], P0[4], P3[2], in order to read the sensor's signal, the display shows me 0.00 ºC, but when I use any other GPIO Pin the display shows a correct temperature value?

There is something I'm missing something about those pins? Any caracteristic that doesn't allow them to function in data sensor reading? 

Thanks in advance...

0 Likes
1 Solution
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

Assuming you are using KIT-059 (missing details of your setup), the 4 port pins you identified have 1uF capacitors attached to them.

Good luck with your project.

View solution in original post

5 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

Assuming you are using KIT-059 (missing details of your setup), the 4 port pins you identified have 1uF capacitors attached to them.

Good luck with your project.

Hi Bibi, I have one more question, if I make my own PCB using this microcontroller CY8C5888LTI-LP097 and I don't attach these capacitors to the previous pins I asked about. It's supposed I will be able to used those pin without problems? Thanks

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Julian,

BiBi is correct.  Those pins have 1uF caps on them.  The presence of the cap on the DQ signal line will act as a Low-pass filter.  When you're driving a '0' on DQ line with a driver source resistance of about 150 ohms to GND, the fall time is about (150 * 1u) 150us.   When you let DQ float to a '1' (using an open-drain output with the recommended 4.7K pullup) your rise time is about (4700 * 1u) 4.7ms.

The longer rise time limits your maximum data rate to about 1/(4.7ms * 10) = 21 Hz.   Therefore if you lower your datarate to this frequency or lower, it should work on these pins.

 

Len
"Engineering is an Art. The Art of Compromise."
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

JulianLBTK,

There is a DS18B20 component for PSoC4/PSoC5 available, which allows reading up to 8 DS18B20 sensors sinyltaneously.

Component to read DS18B20 digital temperature sensors

/odissey1

Figure 1. Project chematics.

DS18x1_schematic_01.png

Figure 2. Project annotation using the PSoC Annotation Library v1.0.

Notice bypass capacitors on the KIT-059 board.

DS18x1_KIT-059_01.png

JulianLBTK
Level 1
Level 1
10 sign-ins 5 likes given 5 sign-ins

Thanks a lot Oddisey, Lean and Bibi, it was a really clear explanation.

0 Likes