Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pic16f1936
#3
my project is for mplabx , file is bootloader


and my app use 485 code with C(piece code)
Code:
#define RE LATA1   
#define DE LATC5
for Receive
Code:
void ur_init(void) {
    INTCON = 0b00000000; //GIE and PEIE disable;TO and INT enable;IntFlag cleared
    SPBRG = 25; // 19200  8M  HIGH 25
    BRGH = 1;
    RCSTA = 0x90;
    // RCSTA: SPEN RX9 SREN CREN ADDEN FERR OERR RX9D 
    //           1   0    0    1    0     0    0    0  
    TXSTA = 0x06;
    // TXSTA : CSRC TX9 TXEN SYNC -- BRGH TRMT TX9D 
    //          0    0   0     0       1    1    0   
    rclenth = 0;
    txlenth = 0;
    TRISC7 = 1;
    RE = 1;
    DE = 0;
    CREN = 1;
    RCIE = 1;
    INTCON = 0b11000000;
}

Send
Code:
DE = 1;
    RE = 0;
    TXEN = 1;
    TXIE = 1;


Attached Files
.zip   firmware_PIC12F_PIC16F.zip (Size: 70.16 KB / Downloads: 14)
Reply


Messages In This Thread
pic16f1936 - by hhhluck - 2014-06-04, 08:58:08
RE: pic16f1936 - by Mikael Gustavsson - 2014-06-04, 22:57:19
RE: pic16f1936 - by hhhluck - 2014-06-05, 03:21:14
RE: pic16f1936 - by Mikael Gustavsson - 2014-06-07, 19:29:16
RE: pic16f1936 - by hhhluck - 2014-06-09, 08:44:14
RE: pic16f1936 - by Mikael Gustavsson - 2014-06-09, 22:08:07
RE: pic16f1936 - by hhhluck - 2014-06-10, 02:59:52
RE: pic16f1936 - by Mikael Gustavsson - 2014-06-23, 19:34:46
RE: pic16f1936 - by Mikael Gustavsson - 2014-06-23, 19:41:39

Forum Jump:


Users browsing this thread: 1 Guest(s)