Ejemplo: Control de Motor
Ejemplo: Control de Motor
Ejemplo: Control de Motor
TRIS A = %11100
1 1 1 0 0 LB
TRIS B = %11110110
1 BYTE.
//Cambio de rotacin.
TRIS A = %00000001
PAUSE 6000
PAUSE 10000
END
WEND
PIC BASIC Instruction Set.
1. ASM ENDASM Insert assembly language code.
2. BRANCH Computed GOTO.
3. BUTTON Debounce and auto-repeat on specified pin.
4. CALL Call assembly language subroutine.
5. EEPROM Store data in EEPROM.
6. END Stop excursion and enter low power mode.
7. FOR NEXT Execute a number of times.
8. GOSUB Call BASIC subroutine.
9. GOTO Jump to a specified label.
10. HIGH Make a pin logic HIGH.
11. I2CIN Read bytes from an I2C device.
12. I2COUT Send out data to an I2C device.
13. IF THEN Conditional execution of statements.
14. INPUT Make a pin input.
15. LET Assign to a variable.
16. LOOKDOWN Search a table for a value.
17. LOOKUP Fetch value from a table.
18. LOW Make a pin logic LOW.
19. NAP Power down the processor.
20. OUTPUT Make pin output.
21. PAUSE Delay specified number of milliseconds.
22. PEEK Read data from a register.
23. POKE Store data in register.
24. POT Read potentiometer on a specified pin.
25. PULSIN Measure pulse width on a pin.
26. PULSOUT Send a pulse to a specified pin.
27. PWM Output pulse width modulate data.
28. RANDOM Generate a random number.
29. READ Read byte from on-chip EEPROM.
30. RETURN Return from a subroutine.
31. REVERSE Make output pin an input or an input pin an output.
32. SERIN Read serial data in.
33. SEROUT Send serial data out.
34. SLEEP Power down the processor for a period of time.
35. SOUND Generate tone on a specified pin.
36. TOGGLE Toggle the state of an output pin.
37. WRITE Write data byte to the on-chip EEPROM.
PIC BASIC PRO Instruction Set.
1. @ Insert a line of assembly language code.
2. ADCIN Read on-chip A/D converter.
3. ASM ENDASM Insert assembly language code.
4. BRANCH Computed GOTO.
5. BRANCHL Long BRANCH.
6. BUTTON Debounce and auto-repeat on specified pin.
7. CALL Call assembly language subroutine.
8. CLEAR Zero all variable.
9. CLEARWDT Clear watchdog timer.
10. COUNT Count number of pulses on a pin.
11. DATA Store data in on-chip EEPROM.
12. DEBUG Serial data out to a fixed pin.
13. DEBUGIN Serial input from a fixed pin.
14. DISABLE Disable interrupt processing.
15. DISABLE DEBUG Disable ON DEBUG processing.
16. DISABLE INTERRUPT Disable ON INTERRUPT processing.
17. DTMFOUT Generate touch tones on a specified pin.
18. EEPROM Store data in EEPROM.
19. ENABLE Enable ON INTERRUPT and ON DEBUG processing.
20. ENABLE DEBUG Enable ON DEBUG processing.
21. ENABLE INTERRUPT Enable ON INTERRUPT processing.
22. END Stop execution and enter low power mode.
23. FOR NEXT Execute a number of times.
24. FREQOUT Generate frequencies on a specified pin.
25. GOSUB Call BASIC subroutine.
26. GOTO Jump to a specified label.
27. HIGH Make a pin logic HIGH.
28. HSERIN Hardware serial input.
29. HSEROUT Hardware serial output.
30. I2CREAD Read bytes from an I2C device.
31. I2CWRITE Write bytes to an I2C device.
32. IF THEN ELSE Conditional execution of statements.
33. INPUT Make a pin input.
34. LCDIN Read RAM on an LCD.
35. LCDOUT Display data on an LCD.
36. LET Assign to a variable.
37. LOOKDOWN Search a table for a value.
38. LOOKDOWN2 Search variable table for a value.
39. LOOKUP Fetch value from a table.
40. LOOKUP2 Fetch variable form a table.
41. LOW Make a pin logic LOW.
42. NAP Power down the processors.
43. ON DEBUG Execute debug monitor.
44. ON INTERRUPT Execute a specified code on an interrupt.
45. OUTPUT Make a pin output.
46. PAUSE Delay specified number of milliseconds.
47. PAUSEUS Delay specified number of microseconds.
48. PEEK Read data form a register.
49. POKE Store data in a register.
50. POT Read potentiometer on a specified pin
51. PULSIN Measure pulse width on a pin.
52. PULSOUT Send a pulse to a specified pin.
53. PWM Output pulse width modulated data.
54. RANDOM Generate a random number.
55. RCTIME Measure pulse width on a specified pin.
56. READ Read byte from on-chip EEPROM.
57. RESUME Continue normal execution after an interrupt.
58. RETURN Return from a subroutine.
59. REVERSE Make output pin an input or an input pin an output.
60. SERIN Read serial data in.
61. SERIN2 Read serial data in.
62. SEROUT Send serial data out.
63. SEROUT2 Send serial data out.
64. SHIFTIN Receive synchronous serial data.
65. SHIFTOUT Send synchronous serial data out.
66. SLEEP Power down the processor for a period of time.
67. SOUND Generate tone on a specified pin.
68. STOP Stop program execution.
69. SWAP Exchange the values of two variables.
70. TOGGLE Toggle the state of an output pin.
71. WHILE WEND Execute code enclosed while the condition is true.
72. WRITE Write data byte to the on-chip EEPROM.
73. XIN X-10 input.
74. XOUT X-10 output.