Skip to content

Instantly share code, notes, and snippets.

@samirfor
Created February 6, 2015 23:54
Show Gist options
  • Save samirfor/16671074d49c2cdcbf93 to your computer and use it in GitHub Desktop.
Save samirfor/16671074d49c2cdcbf93 to your computer and use it in GitHub Desktop.
Pisca LED
/**
* Ferramenta SanUSB: http://sanusb.site50.net/
* Compilar com MPLABX+C18: https://drive.google.com/open?id=0B5332OAhnMe2N3czQWxVX0JVSkE&authuser=0
*
* Este programa pisca o LED do pino b7.
* Foto da placa: https://drive.google.com/file/d/0BwIZj8djOAj2akptcEEwcFpOazg/view?usp=sharing
*/
#include "SanUSB48.h"
#pragma interrupt interrupcao //Tem que estar aqui ou dentro do firmware.c
void interrupcao() {
}
void main() {
clock_int_48MHz();
while (1) {
if (!entrada_pin_e3) { //pressionar o botão para gravação
Reset();
}
inverte_saida(pin_b7);
tempo_ms(100);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment