Documentación
INICIOLAB I4.0CURSOSTIENDA
ES
ES
  • 📖Docs
  • ↘️PLATAFORMA XIDE IoT
    • X-NODEs
      • X-NODE / XC01 – ESP32-S3 Controlador WiFi & Bluetooth
      • X-NODE / XC03 – SIM7080G Red celular LTE y GNSS
      • X-NODE / XC04 - BG95 M2 Red celular LTE y GNSS
      • X-NODE / XC09 – IN100 NanoBeacon Bluetooth
      • X-NODE / XN01 - Entradas Digitales
      • X-NODE / XN02 - Salidas Digitales
      • X-NODE / XN03 - Entradas/Salidas Analógicas
      • X-NODE / XN04 – Sensores Temperatura/Humedad/Luminosidad
      • X-NODE / XN09 – BME688 Sensor Ambiental con IA
      • X-NODE / XN11 - 2 Relevadores
      • X-NODE / XN13 - 1 Relevador 10A
      • X-NODE / XN14 - Fuente de Alimentación 24V DC
      • X-NODE / XN15 - Fuente de Alimentación 110-220V AC
      • X-NODE / XN19 - Adaptador de señales
      • X-NODE / XN26 - 4 x Entradas 24V DC
      • X-NODE / XN27 - 4 x Salidas 24V DC
      • X-NODE / XN29 - 4 Relevadores 1A
      • X-NODE / XN30 - 2 x Entradas 4-20 mA
      • X-NODE / XN31 - 3 x Entradas Corriente AC
    • X-BOARDs
      • X-BOARD / XB01 - IoTrainer
      • X-BOARD / XB02 - Arduino Nano 33
      • X-BOARD / XB03 - Raspberry Pi Pico
      • X-BOARD / XB04 - Raspberry Pi
      • X-BOARD / XB05 - Curiosity Nano
      • X-BOARD / XB06 - Arduino MKR
      • X-BOARD / XB07 - ToSix
      • X-BOARD / XB08 - Thing Plus
      • X-BOARD / XB09 - Click to Qwiic
      • X-BOARD / XB10 - Feather
      • X-BOARD / XB15 - XIAO
      • X-BOARD / XBI01 - IIoTrainer
      • X-BOARD / XBI06 - Arduino MKR IIoT
      • IoT Traffic - Tarjeta Controladora de Semáforos
    • Red Celular IoT
      • SIMs
        • SIM Card – Multicarrier
      • Antenas
        • Antena LTE YE0004AA
        • Antena LTE YF0006AA
        • Antena LTE YMLR001
        • Antena Activa GPS
        • Antena Activa GPS YG0015AA
        • Antena Pasiva GPS YEGT001AA
    • Accesorios
      • Caja estanca IP65
  • Acerca de...
    • Plataforma XIDE
    • Estándar mikroBUS™
    • Estándar Qwiic®
  • ↘️TARJETAS DE DESARROLLO PICs
    • X-TRAINER
      • X-TRAINER LITE M
        • R3
          • X-TRAINER LITE M R3 PIC18F45K50
          • X-TRAINER LITE M R3 PIC18F4550
          • X-TRAINER LITE M R3 PIC16F877A
          • X-TRAINER LITE M R3 PIC16F887
        • R2
          • X-TRAINER LITE M R2 PIC18F45K50
          • X-TRAINER LITE M R2 PIC18F4550
          • X-TRAINER LITE M R2 PIC16F877A
          • X-TRAINER LITE M R2 PIC16F887
      • X-TRAINER LITE F
        • R1
          • X-TRAINER LITE F R1 PIC18F45K50
          • X-TRAINER LITE F R1 PIC18F4550
          • X-TRAINER LITE F R1 PIC16F877A
          • X-TRAINER LITE F R1 PIC16F887
      • X-TRAINER DIP
        • R3
          • X-TRAINER DIP R3 PIC18F45K50
          • X-TRAINER DIP R3 PIC18F4550
        • R2
          • X-TRAINER DIP R2
      • X-TRAINER PRO
        • R4
          • X-TRAINER PRO R4 PIC18F45K50
          • X-TRAINER PRO R4 PIC18F4550
          • X-TRAINER PRO R4 PIC16F877A
          • X-TRAINER PRO R4 PIC16F887
        • R3
          • X-TRAINER PRO R3 PIC18F45K50
          • X-TRAINER PRO R3 PIC18F4550
          • X-TRAINER PRO R3 PIC16F877A
          • X-TRAINER PRO R3 PIC16F887
        • R2
          • X-TRAINER PRO R2
    • Probador lógico
    • Software MICROSIDE v1.0
      • Instalación
      • X-TRAINER - PIC18F4550/45K50
      • Terminal Serial COM/TCP
      • XCU / XCU LT - Programador PICs
      • XCU / XCU LT - Programador AVRs
      • Descarga
    • Software X-TRAINER Suite
      • Instalación
      • PIC18F4550/45K50
      • PIC16F877A/887
      • Configuración de bootloader
        • PIC C Compiler CCS
        • mikroC PRO for PIC
        • MPLAB X IDE
          • XC8 Compiler
          • PIC-AS Compiler
          • MPASM Compiler
      • Descarga
  • Programadores PICs & AVRs
    • PIC & AVR
      • PROGRAMADOR PIC & AVR - XCU
      • PROGRAMADOR PIC & AVR - XCU LT
    • PIC
      • PROGRAMADOR PIC - K150 PRO
    • Software K150 PRO Suite
      • Instalación
      • Programador PICs
      • Descarga
    • Software XCU & XCU LT
      • Instalación
      • XCU / XCU LT - Programador PICs
      • XCU / XCU LT - Programador AVRs
      • Descarga
    • Preguntas frecuentes
      • ¿Windows no reconoce XCU como puerto serial COM?
      • ¿Cómo programar con el módulo XCU a través del IDE Microchip Studio for AVR?
  • 🥽PRÁCTICAS
    • Compiladores
    • PIC C Compiler CCS
      • PIC18F4550 | PIC18F45K50
        • 1 - Blink LED
        • 2 - Push Button
        • 3 - Corrimiento de Bits
        • 4 - Contador Binario
        • 5 - ADC
        • 6 - ADC Set Point
        • 7 - USB CDC
        • 8 - PWM
        • 9 - LED RGB
        • 10 - Teclado Matricial
        • 11 - LCD
        • 12 - DAC
        • 13 - Motor DC + Driver L298N
        • 14 - Motor DC + Sensor IR Sharp GP2Y0A21
        • 15 - Servomotor
        • 16 - Servomotor + Potenciómetro
        • 17 - Sensor de Temperatura LM35
        • 18 - Sensor de Temperatura DS18B20
        • 19 - Sensor Ultrasónico HC-SR04
        • 20 - Bluetooth HC-05
        • 21 - Bluetooth HM-10
        • 22 - Comunicación Serial UART
      • PIC16F887 | PIC16F877A
        • 1 - Blink LED
        • 2 - Push Button
        • 3 - Corrimiento de Bits
        • 4 - Contador Binario
        • 5 - ADC
        • 6 - ADC Set Point
        • 7 - PWM
        • 8 - LED RGB
        • 9 - Teclado Matricial
        • 10 - LCD
        • 11 - Motor DC + Driver L298N
        • 12 - Motor DC + Sensor IR Sharp GP2Y0A21
        • 13 - Servomotor
        • 14 - Servomotor + Potenciómetro
        • 15 - Sensor de Temperatura LM35
        • 16- Sensor de Temperatura DS18B20
        • 17 - Sensor Ultrasónico HC-SR04
        • 18 - Bluetooth HC-05
        • 19 - Bluetooth HM-10
        • 20 - Comunicación Serial UART
    • mikroC PRO for PIC
      • PIC18F4550 | PIC18F45K50
        • 1 - Blink LED
        • 2 - Push Button
        • 3 - Corrimiento de Bits
        • 4 - Contador Binario
        • 5 - ADC
        • 6 - ADC Set Point
        • 7 - PWM
        • 8 - LED RGB
        • 9 - Teclado Matricial
        • 10 - LCD
        • 11 - DAC
        • 12 - Motor DC + Driver L298N
        • 13 - Motor DC + Sensor IR Sharp GP2Y0A21
        • 14 - Servomotor
        • 15 - Servomotor + Potenciómetro
        • 16 - Sensor de Temperatura LM35
        • 17 - Sensor de Temperatura DS18B20
        • 18 - Sensor Ultrasónico HC-SR04
        • 19 - Bluetooth HC-05
        • 20 - Bluetooth HM-10
        • 21 - Comunicación Serial UART
    • MPLAB X IDE
      • XC8 COMPILER
        • PIC18F4550 | PIC18F45K50
          • 1 - Blink LED
          • 2 - Push Button
          • 3 - Corrimiento de Bits
          • 4 - Contador Binario
          • 5 - ADC
          • 6 - ADC Set Point
          • 7 – USB CDC
          • 8 - PWM
          • 9 - LED RGB
          • 10 - Teclado Matricial
          • 11 - LCD
          • 12 - DAC
          • 13 - Motor DC + Driver L298N
          • 14 - Motor DC + Sensor IR Sharp GP2Y0A21
          • 15 - Servomotor
          • 16 - Servomotor + Potenciómetro
          • 17 - Sensor de Temperatura LM35
          • 18 - Sensor de Temperatura DS18B20
          • 19 - Sensor Ultrasónico HC-SR04
          • 20 - Bluetooth HC-05
          • 21 - Bluetooth HM-10
          • 22 - Comunicación Serial UART
      • PIC-AS Compiler
        • PIC18F4550 | PIC18F45K50
          • 1 - Blink LED
          • 2 - Push Button
          • 3 - Corrimiento de Bits
          • 4 - Contador Binario
          • 5 - ADC
          • 6 - ADC Set Point
      • MPASM Compiler
        • PIC18F4550 | PIC18F45K50
          • 1 - Blink LED
          • 2 - Push Button
          • 3 - Corrimiento de Bits
          • 4 - Contador Binario
          • 5 - ADC
          • 6 - PWM
    • Arduino IDE
      • 1 - Blink LED
      • 2 - Push Button
      • 3 - Corrimiento de bits
      • 4 - Contador binario
      • 5 - ADC
      • 6 - ADC Set Point
      • 7 - Comunicación UART
      • 8 - PWM
      • 9 - LED RGB
      • 10 - Teclado matricial
      • 11 - LCD
      • 12 - Motor DC + Driver L298N
      • 13 - Motor DC + Sensor IR Sharp GP2Y0A21
      • 14 - Servomotor
      • 15 - Servomotor + Potenciómetro
      • 16 - Sensor LM35
      • 17 - Sensor DS18B20
      • 18 - Sensor ultrasónico HC-SR04
      • 19 - Bluetooth HC-05
      • 20 - Bluetooth HM-10
  • Ambientes de programación IDEs
    • PlatformIO IDE / Visual Studio Code
    • PIC C Compiler CCS
    • mikroC PRO for PIC
    • MPLAB Code Configurator MCC - MPLAB X IDE
    • Librería USB - MPLAB X IDE
    • Arduino® IDE
    • Instalar una Librería en Arduino
  • Workshops
    • Taller Introductorio XIDE - IoT en 24 hrs
    • 👋Acerca de MICROSIDE
Con tecnología de GitBook
En esta página
  • Configuración de bootloader
  • Ejemplo:

¿Te fue útil?

  1. TARJETAS DE DESARROLLO PICs
  2. Software X-TRAINER Suite
  3. Configuración de bootloader
  4. MPLAB X IDE

MPASM Compiler

AnteriorPIC-AS CompilerSiguienteDescarga

Última actualización hace 10 meses

¿Te fue útil?

Configuración de bootloader

Esta configuración solo es compatible para los PIC18F4550 y PIC18F45K50.

Para utilizar un PIC18F4550/45K50 precargado con Bootloader Microside es indispensable colocar las siguientes líneas de código en el encabezado del programa:

;====================================================================
; VECTOR DE INICIO
;--------------------------------------------------------------------

	ORG		0x2000
	GOTO		START
	
	ORG	  	0x2008
	RETFIE

	ORG	    	0x2018
	RETFIE

La configuración del bootloader debe de ir antes de cualquier bloque de código, de lo contrario no funcionaría.

Realiza dicha configuración antes de intentar cargar el programa, de lo contrario el Software X-TRAINER Suite podría presentar errores.

Todas nuestras prácticas para PIC18F4550/45K50 en MPLAB X IDE - MPASM Compiler ya están configuradas para su uso con Bootloader Microside.

Ejemplo:

;====================================================================

	LIST P=18F4550 
	#include "P18f4550.INC" ;ENCABEZADO

;====================================================================
; Bits de configuracion
;--------------------------------------------------------------------

  CONFIG  PLLDIV = 5            ; PLL Prescaler Selection bits (Divide by 5 (20 MHz oscillator input))
  CONFIG  CPUDIV = OSC2_PLL3    ; System Clock Postscaler Selection bits ([Primary Oscillator Src: /2][96 MHz PLL Src: /3])
  CONFIG  USBDIV = 2            ; USB Clock Selection bit (used in Full-Speed USB mode only; UCFG:FSEN = 1) (USB clock source comes from the 96 MHz PLL divided by 2)
  CONFIG  FOSC = HSPLL_HS       ; Oscillator Selection bits (HS oscillator, PLL enabled (HSPLL))
  CONFIG  FCMEN = ON            ; Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor enabled)
  CONFIG  PWRT = ON             ; Power-up Timer Enable bit (PWRT enabled)
  CONFIG  BOR = SOFT            ; Brown-out Reset Enable bits (Brown-out Reset enabled and controlled by software (SBOREN is enabled))
  CONFIG  BORV = 1              ; Brown-out Reset Voltage bits (Setting 2 4.33V)
  CONFIG  VREGEN = ON           ; USB Voltage Regulator Enable bit (USB voltage regulator enabled)
  CONFIG  WDT = OFF             ; Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit))
  CONFIG  PBADEN = OFF          ; PORTB A/D Enable bit (PORTB<4:0> pins are configured as digital I/O on Reset)
  CONFIG  LVP = OFF             ; Single-Supply ICSP Enable bit (Single-Supply ICSP disabled)

;====================================================================
; Macros
;--------------------------------------------------------------------

	#DEFINE	LED		 LATA,4  ;LED PIN A4

;====================================================================
; MEMORIA DE DATOS
;--------------------------------------------------------------------

	CBLOCK  0x00
	REG1
	REG2
	REG3
	ENDC

;====================================================================
; CONFIGURACION DE BOOTLOADER (VECTOR DE INICIO)
;--------------------------------------------------------------------

	ORG		0x2000
	GOTO		START
	
	ORG	  	0x2008
	RETFIE

	ORG	    	0x2018
	RETFIE

;====================================================================
; PROGRAMA PRINCIPAL
;--------------------------------------------------------------------
START	                      ; PUNTO DE ENTRADA DEL PROGRAMA EN REINICIO
	SETF	ADCON1	      ; PUERTO A SE CONFIGURA DIGITAL
	SETF	TRISA	      ; PUERTO A SE CONFIGURA COMO ENTRADAS
        BCF     TRISA,4       ; PIN RA4 SE CONFIGURA COMO SALIDA
        CLRF	LATA	      ; SE LIMPIA PUESRTO A
        
LOOP    BTG    LED	      ; CAMBIO DE ESTADO DE PIN RA4
        ; RETARDO 500mS ( 5 x Base 100mS)
	CALL 	DELAY_100MS	  ;
        CALL 	DELAY_100MS	  ; 
	CALL 	DELAY_100MS	  ;
	CALL 	DELAY_100MS	  ;
	CALL 	DELAY_100MS	  ;

	GOTO	LOOP
			
;====================================================================
; RETARDOS
;--------------------------------------------------------------------

DELAY_100MS			;100mS
	MOVLW	.17	        ;MUEVE LITERAL EN BASE 10 A WREG
	MOVWF	REG1		;MUEVE WREG A REG1
LOOP1	MOVLW	.204
	MOVWF	REG2
LOOP2	MOVLW	.114
	MOVWF	REG3
LOOP3	DECFSZ	REG3		;DECREMENTA REG3, OMITE "GOTO LOOP3" SI REG3 = 0
	GOTO	LOOP3
	DECFSZ	REG2
	GOTO	LOOP2
	DECFSZ	REG1
	GOTO	LOOP1
	RETURN
END
↘️