27 Mayıs 2010 Perşembe

PIC Basic Komutlar Listesi

ADINRead on-chip analogue to digital converter.
ASM-ENDASMIt's always possible to insert assembly language.
BOXDraw a square on a graphic LCD.
BRANCHComputed GOTO for PIC devices with only one page memory. (= ONGOTO, see there)
BRANCHLComputed GOTO for PIC devices with more than one page memory or 16-bit core PIC devices. (= ONGOTOL, see there)
BREAKExit a FOR-NEXT, REPEAT-UNTIL or WHILE-WEND loop early.
BSTARTSend a START condition to the I2C bus.
BSTOPSend a STOP condition to the I2C bus.
BRESTARTSend a RESTART condition to the I2C bus.
BUSACKSend a ACKNOWLEGDE condition to the I2C bus.
BUSINRead bytes from I2C device.
BUSOUTWrite bytes to I2C device.
BUTTONDetect and debounce a key press.
CALLCall assembly language subroutine.
CDATADefine initial contents in memory.
CF_INITInitialise the lines used for Compact Flash card.
CF_SECTORSetup the sector in the Compact Flash card that is to be written or read by the commands CF_READ and CF_WRITE.
CF_READRead data from a Compact Flash card.
CF_WRITEWrite data to a Compact Flash card.
CIRCLEDraw a circle on a graphic LCD.
CLEARPlace a variable or bit in a low state or clear all RAM area.
CLEARBITClear a bit or a port or variable, using a variable index.
CLSClear a LCD.
CONFIGAdjust programming fuse configurations.
COUNTERCount number of pulses on a pin.
CREADRead word from code memory.
CURSORPosition the cursor on a LCD.
CWRITEWrite word to code memory.
DATADefine initial contents in memory.
DECVariable = Variable - 1 (Decrement).
DECLAREAdjust library routine parameters.
DELAYMSDelay with millisecond resolution (ms).
DELAYUSDelay with microsecond resolution (2s).
DEVICEChoose the type of PIC to compile with.
DIGReturn the value of a decimal digit.
DIMCreate a variable.
DISABLEDISABLE software interrupts that were previously ENABLED.
DTMFOUTProduce a DTMF touch tone sequence on a pin.
EDATADefine initial contents of on-chip EEPROM.
ENABLEENABLE software interrupts that were previously DISABLED.
ENDStop execution.
EREADRead byte, word or dword from on-chip EEPROM.
EWRITEWrite byte, word or dword to on-chip EEPROM.
FOR...TO...NEXT...
STEP
Repeatedly execute statements.
FREQOUTGenerate one or two tones of differing or the same frequencies.
GETBITExamine a bit of a port or variable, using a variable index.
GOSUBCall BASIC subroutine at specified label.
GOTOContinue execution at specified label.
HBRESTARTSend a RESTART condition to the I2C bus using the MSSP module.
HBSTARTSend a START condition to the I2C bus using the MSSP module.
HBSTOPSend a STOP condition to the I2C bus using the MSSP module.
HBUSACKSend a ACKNOWLEDGE condition to the I2C bus using the MSSP module.
HBUSINRead bytes from I2C device using the MSSP module.
HBUSOUTWrite bytes to I2C device using the MSSP module.
HIGHMake pin or port high.
HPWMGenerate a PWM signal using the CCP module.
HRSINReceive data from the serial port on devices that contain a USART.
HRSOUTTransmit data to the serial port on devices that contain a USART.
HSERINReceive data from the serial port on devices that contain a USART.
HSEROUTTransmit data to the serial port on devices that contain a USART.
HRSIN2Same as HRSIN but using a 2nd USART if available.
HRSOUT2Same as HRSOUT but using a 2nd USART if available.
HSERIN2Same as HSERIN but using a 2nd USART if available.
HSEROUT2Same as HSEROUT but using a 2nd USART if available.
IF...THEN...ELSEIF...
ELSE...ENDIF
Conditionally execute statements.
INCVariable = Variable + 1 (Increment)
INCLUDELoad a BASIC file into the source code.
INKEYScan a matrix keypad.
INPUTMake a pin or port an input.
LCDREADRead a single byte from a graphic LCD.
LCDWRITEWrite bytes to a graphic LCD.
LDATAPlace information into code memory.
LEFT$Extract amount of characters from the left of a source string and copy them into a destination string.
LENFind the length of a string, NULL terminator not included.
[LET]LET is optional (not necessary). Assign result of an expression to a variable.
LINEDraw a straight line in any direction on a graphic LCD.
LINETODraw a straight line in any direction on a graphic LCD, starting from the previous LINE command's end position.
LOADBITSet or clear a bit of a port or variable, using a variable index.
LOOKDOWNSearch constant in table for value.
LOOKDOWNLSearch constant or variable in table for value.
LOOKUPFetch constant value from table.
LOOKUPLFetch constant or variable value from table.
LOWMake pin or port low.
LREADRead a value from a LDATA table.
LREAD8Access 8-bit values from an LDATA table.
LREAD16Access 16-bit values from an LDATA table.
LREAD32Access 32-bit values from an LDATA table, this also includes floating point values.
MID$Extract amount of characters from a source string beginning at characters from the left, and copy them into a destination string.
ON GOSUBCause the program to Call a subroutine based on an index value
ON GOTOCause the program to jump to different locations based on a variable index. On a PICmicro device with only one page of memory. (See BRANCH)
ON GOTOLCause the program to jump to different locations based on a variable index. On a PICmicro device with more than one page of memory or 16-bit core devices. (See BRANCHL)
ON INTERRUPTExecute a subroutine on a SOFTWARE interrupt.
ON_INTERRUPTExecute a subroutine on a HARDWARE interrupt.
ON_LOW_INTERRUPTExecute a subroutine when a LOW PRIORITY HARDWARE interrupt occurs on a 16-bit core device.
OUTPUTMake a pin or port output.
OREADReceive data from a device using the Dallas 1-wire protocol. (One wire protocol)
ORGSet program origin.
OWRITETransmits data to a device using the Dallas 1-wire protocol. (One wire protocol)
PAUSEBetter is using DELAYMS.
PEEKRead byte from register.
PIXELRead a single pixel from a graphic LCD.
PLOTSet a single pixel on a graphic LCD.
POKEWrite byte to register.
POPPull a single variable or multiple variables from a software stack
POTRead potentiometer on a specified pin.
PRINTDisplay characters on a LCD.
PULSINMeasure pulse width on a pin.
PULSOUTGenerate pulse to a pin.
PUSHPlace a single variable or multiple variables onto a software stack.
PWMOutput pulse width modulated pulse train to a pin.
RANDOMGenerate a pseudo-random number.
RC5INRead infrared signal from Philips remote controls (TV, audio, etc.) (RC5 protocol) see also SONYIN.
RCINMeasure pulse width on a pin.
READRead byte or word from memory.
REMAdd a remark to the source code, use as many text as you like. More clear is to use the apostrof (') or the point-comma (;)
REPEAT...UNTILExecute a block of instructions until a condition is true.
RESTOREAdjust the position of data to READ.
RESUMERe-enable software interrupts and return.
RETURNContinue at statement following last GOSUB.
RIGHT$Extract amount of characters from the right of a source string and copy them into a destination string.
RSINAsynchronous serial input from fixed pin and baud.
RSOUTAsynchronous serial output to fixed pin and baud.
SEEDSeed the random number generator.
SELECT...CASE...
ENDSELECT
Conditionally run blocks of code.
SERINReceive asynchronous serial data (i.e. RS232 data).
SEROUTTransmit asynchronous serial data (i.e. RS232 data).
SERVOControl a servo motor.
SETPlace a variable or pin in a high state.
SET_OSCCALCalibrate the on-chip oscillator. (Adjust intern oscillator)
SETBITSet a bit of a port or variable, using a variable index.
SHINSynchronous serial input (SHIFT IN).
SHOUTSynchronous serial output (SHIFT OUT).
SLEEPPower down processor for a period of time.
SNOOZEPower down processor for short period of time.
SONYINRead infrared signal from Sony remote controls (TV, audio, etc.) (SIRC) see also RC5IN.
SOUNDGenerate tone or white-noise on specified pin.
SOUND2Generate 2 tones to 2 separate pins.
STOPStop program execution.
STRNCreate a NULL terminated byte array.
STR$Convert the contents of a variable to a NULL terminated string.
SWAPExchange the values of two varibales.
SYMBOLCreate an alias for a variable or gives a name to a constant, port, pin or register.
TOGGLEReverse the state of a port bit. Makes an output high when it was low or low when it was high.
TOLOWERConvert the characters from a source string to lower case.
TOUPPERConvert the characters from a source string to upper case.
UNPLOTClear a single pixel on a graphic LCD.
USBINITInitialise the USB interrupt on devices that contain a USB module.
USBINReceive data via a USB endpoint on devices that contain USB.
USBOUTTransmit data via a USB endpoint on devices that contain USB.
VALConvert a NULL terminated string to an integer value.
VARPTRLocate the address of a variable.
WHILE...WENDExecute statements while condition is true.
XINReceive data using the X10 protocol.
XOUTTransmit data using the X10 protocol.

Hiç yorum yok:

Yorum Gönder

İzleyiciler

LED DİRENÇ HESAPLAMA

All LEDs require current limiting, without a current limiting mechanism the LED will usually burn out in under a second. Adding a simple resistor is the easiest way to limit the current. Use the calculator below to find out the value of resistor you require.

For example if you are wanting to power one of our_blank">red LEDs in an automotive application you would see that the typical forward voltage is 2.0 Volts and the maximum continuous forward current is 30mA. Therefore you would enter 14.5, 2.0 and 30 into the Single LED calculation box. After calculating you get 470ohm 1 watt as the result. Here is a that allows you to enter a resistor value and generate the corresponding color code.

Note: For automotive applications use the actual system voltage, not 12 Volts. Most 12 Volt system actually operate at around 14.5 Volts.

Supply Voltage
VOLTS
Voltage Drop Across LED
VOLTS
Desired LED Current
MILLIAMPS



Calculated Limiting Resistor
OHMS
Nearest higher rated 10% resistor

Calculated Resistor Wattage
WATTS
Safe pick is a resistor with
power rating of (common values are .25W, .5W, and 1W)
WATTS

LEDs in series

Several leds in series with one resistor
Supply Voltage
VOLTS
Voltage Drop Across LED
VOLTS
Desired LED Current
MILLIAMPS
How many LEDs connected




Calculated Limiting Resistor
OHMS
Nearest higher rated 10% resistor

Calculated Resistor Wattage
WATTS
Safe pick is a resistor with
power rating of (common values are .25W, .5W, and 1W)
WATTS
LM317 UYGULAMA DEVRELERİ HESAPLAMASI

 




Çıkış Voltajı
R1 resistor

R2 resistor

R1 resistor
R2 resistor

Çıkış Voltajı


Lm317 uygulama devreleri ve detayli bilgiye Buradan ulasabilirsiniz

LM555 - ASTABLE OSCILLATOR CALCULATOR

LM555 - ASTABLE OSCILLATOR CALCULATOR
Value Of R1 Ohms Value Of R2 Ohms
Value Of C1 Microfarads
Output Time HIGH SECONDS Output Time LOW SECONDS Output Period HIGH + LOW SECONDS Output Frequency HERTZ Output Duty Cycle PERCENT
Resistor values are in Ohms (1K = 1000) - Capacitor values are in Microfarads (1uF = 1)

NOTE: The leakage currents of electrolytic capacitors will affect the actual output results of the timers. To compensate for leakage it is often better to use a higher value capacitor and lower value resistances in the timer circuits.

LM555 Astable Oscillator Circuit Diagram


LM555 - ASTABLE CAPACITOR CALCULATOR

The next calculator can find the capacitance needed for a particular output frequency if the values of R1 and R2 are known.

Value Of R1 Ohms Value Of R2 Ohms
Frequency Desired Hertz
Capacitance uF
s

VOLT AMPER OHM ve WATT HESAPLAMA

Current:
kA (kiloamps) A (amps) mA (milliamps) µA (microamps)
Voltage:
kV (kilovolts) V (volts) mV (millivolts) µV (microvolts)