Hi All,
I am using P20 as DigitalOut. My code is producing outputs 1 or 0 by using a particular data format. I attached a led to the output and it was blinking smoothly with a pattern I defined in the code.
So far so good. But, this was not my purpose of blinking a led. I have a device to consume this data. It has opto-coupled input and expecting minumum 4 volt input for an HIGH (1) value. Since mbed generates 3.3 volt for the HIGH (1), i can't get the device working. In the first place I thought it is a good idea to use LEVEL Converter from 3.3 volt to 5 volt and I used nMosfet BSS138. Before connecting the device to the leveler output I wanted to test it by the led I used for the P20 output. But, it didn't exhibit the same smooth blinking as the P20 pin output, it was continuesly ON (at least it appears so).
I used voltmeter to meausure the output voltage and I saw that there is only 5 volt. It doesn't follow the signal level at all. (unfortunately, I don't have a scope to see real things)
Could you please put me on the right track and tell me what is going on and/or what should I do to provide proper signalling to the device.
Thanks a lot in advance.
Sener
Hi All,
I am using P20 as DigitalOut. My code is producing outputs 1 or 0 by using a particular data format. I attached a led to the output and it was blinking smoothly with a pattern I defined in the code.
So far so good. But, this was not my purpose of blinking a led. I have a device to consume this data. It has opto-coupled input and expecting minumum 4 volt input for an HIGH (1) value. Since mbed generates 3.3 volt for the HIGH (1), i can't get the device working. In the first place I thought it is a good idea to use LEVEL Converter from 3.3 volt to 5 volt and I used nMosfet BSS138. Before connecting the device to the leveler output I wanted to test it by the led I used for the P20 output. But, it didn't exhibit the same smooth blinking as the P20 pin output, it was continuesly ON (at least it appears so).
I used voltmeter to meausure the output voltage and I saw that there is only 5 volt. It doesn't follow the signal level at all. (unfortunately, I don't have a scope to see real things)
Could you please put me on the right track and tell me what is going on and/or what should I do to provide proper signalling to the device.
Thanks a lot in advance.
Sener