Microchip
直播中

李华

8年用户 1439经验值
私信 关注
[问答]

怎么通过ULN2003和AMP驱动一个单独的段

在我的时钟设计中,我用完了PIN。我只在PIC16F628 A中留下了RA4。想通过ULN2003和AMP驱动一个单独的段(小数点),也希望扫描一个按钮。这会像附件那样工作吗?我需要一个带开关的1K电阻吗?谢谢

以上来自于百度翻译


      以下为原文

    I ran out of pins in my clock design.I left only RA4 in PIC 16F628A.Want to drive a single segment (Decimal Point) via ULN2003 & want to scan a button as well. Will this work as in the attachment?Do I need a series 1K resister with the switch?

Thanks
   Attached Image(s)

回帖(11)

王焕树

2019-4-16 07:43:52
我假设你知道RA4是一个开路漏极输出,所以ULN2003的所有驱动器都必须来自4.7K电阻。在ULN2003输入上至少需要2V来打开它,所以在电阻上只有3V,所以只有0.63Ma。这可能起作用,但是它正好在不工作的阈值上。G.我建议减少上拉电阻到1K。此外,如果引脚仅在2V,那么当按钮不预设时,您将难以读取它。RA4是ST输入,所以对于高输入,至少需要0.8VDD,当VCC=5V时是4V。

以上来自于百度翻译


      以下为原文

    I assume you are aware that RA4 is an open drain output, so all the drive for the ULN2003 has to come from the 4.7k resistor.
You need at least 2V on the ULN2003 input to turn it on, so there's only 3V across the resistor, so only 0.63mA.
This might work, but it's right on the threshold of not working.
I'd suggest reducing the pullup resistor to 1k.
 
Also, if the pin was only at 2V, you'd have trouble reading it as a high when the button is not pressed.
RA4 is an ST input, so needs at least 0.8Vdd for a high input, which is 4V when Vcc=5V.
 
举报

陈鲜孰

2019-4-16 07:55:34
让我们看看整个示意图(或者至少是一个方块图,显示所有PIC引脚的使用情况)。可能有更好的选择——例如:将按钮与数字一起复用,这样一个输入可以处理与你的数字一样多的按钮。或者,比较器具有4位电阻DI。VIDER链DAC,它可以用来实现一个4位ADC,读取按钮连接在一个潜在的分配器与下臂组成的电阻链与按钮短路节点到地面。

以上来自于百度翻译


      以下为原文

    Lets see the whole schematic  (or at least a block diagram showing what all the PIC pins are used for.
 
There's probably a better option - e.g:
 

  • Multiplex the buttons together with the digits so one input can handle as many buttons as you have digits.


  • Alternatively, the comparator has a 4 bit resistor divider chain DAC, which could be used to implement a 4 bit ADC, reading buttons connected in a potential divider with the lower arm composed of a resistor chain with buttons shorting its nodes to ground.
举报

李兆峰

2019-4-16 08:07:51
2002次重击

以上来自于百度翻译


      以下为原文

   


2002 strikes again
举报

陈鲜孰

2019-4-16 08:21:48
2002?它可以追溯到更远的地方——MCUs一开始出现在消费电子产品上,大概是在80年初的某个时候。当然,那时他们没有芯片上的ADC或比较器,但是你可以从I/O引脚充电电容器,然后将PIN设置为输入并让C。AP通过你的电阻梯放电,时间要花多长时间才能变低。

以上来自于百度翻译


      以下为原文

    2002?
It dates back far further than that - as soon as MCUs started appearing in consumer electronics, so probably sometime around the early 80's.   Of course back then they didn't have on-chip ADCs or comparators, but you could charge a capacitor from an I/O pin, then set the pin as an input and let the cap discharge through your resistor ladder, and time how long it took to go low.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分