このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


Pascalite 金物類/武器類: Using the ADCs HOME - - - - - - - - - Other 構成要素 for programmers - - - - - - - - - Pascalite, "How To Use It" main page

Pascalite 金物類/武器類: Using the ADCs


Using the ADCs: Analog to 数字表示式の converters



The に引き続いて assumes you've got your Pascalite 始める,決める up and working. If it gives you what you want, 広大な/多数の/重要な. Be advised, however, that this page is subordinate to others. Visit my Pascalite, "How To Use It" main page if you (機の)カム drectly here and there are things "行方不明の".




(You can show numbers on the LCD if you have one, but the に引き続いて programs will also send at least part of every number to the four LEDs for those of you without an LCD 陳列する,発揮する.)

The 構成要素 供給(する)d with the Pascalite is good, but just to be 完全にする, here's a little program to illustrate the use of the analog to 数字表示式の converter.

Be careful NOT to 問題/発行する a def_out(d7) when you are using that pin to read ADC channel 3. Likewise, d4, d5, and d6 株 pins with A0, A1 and A2 それぞれ, and can't be 生産(高)s and ADC inputs at the same time.

If you want to be fancy, take a potentiometer of between 5 Kand 100 K ohms. (About 15K would be best.) Attach one end to 5v, one end to GND, and connect the wiper to pin 3 and/or 4. If, from pervious 演習s, you have a swtich and resistor on pins 3 and 4, you can kludge as follows: "short" out the (open) switch with resistors of さまざまな values. You should see different numbers in bADC.

If you then enter and run the に引き続いて, you should see a changing number 生産(高) as you change the position of the wiper on the potentiometer.

program IntTutADC;
var bADC,bTmpG:byte;

手続き NumToLCD(bDisp:byte);
(As IntTut4)
end; {of 手続き}

begin
def_out(d0,d1,d2,d3);
令状(LCD,255); {(疑いを)晴らすs LCD}
repeat
analog(3,bADC);
NumToLCD(bADC);
bTmpG:=bADC MOD 10;
bTmpG:=bTmpG+48;
令状(portd,bTmpG);{This line for people without LCD 陳列する,発揮するs}
延期する(100);
until 4=5;
end.

To search THIS 場所/位置.... (Go to the 場所/位置's above, and use their search buttons if you want to seach them.)... Way to search this 場所/位置 without using forms
Search this 場所/位置 or the web 力/強力にするd by FreeFind

場所/位置 search Web search

広告 from page's editor: Yes.. I do enjoy 収集するing these things for you... hope they are helpful. However.. this doesn't 支払う/賃金 my 法案s!!! If you find this stuff useful, (and you run an MS-DOS or Windows pc) please visit my freeware and shareware page, download something, and 循環させる it for me? Links on your page to this page would also be 高く評価する/(相場などが)上がるd!
Click here to visit editor's freeware, shareware page.

Link to editor's (Arunet) homepage
How to email or 令状 this page's editor, Tom Boyd