Files
-
basette / basetta_front_panel / _saved_basetta_digitale.sch
-
basette / basetta_front_panel / basetta_digitale.kicad_pcb
-
basette / basetta_front_panel / basetta_digitale.sch
-
basette / basetta_lineare / lineare_cv / alimentatore.kicad_pcb
-
basette / basetta_lineare / lineare_cv / alimentatore.sch
-
basette / basetta_lineare / lineare_cv / pic_dac.sch
-
basette / basetta_lineare / lineare_cv / reference_supply.sch
-
basette / basetta_lineare / lineare_rev3 / alimentatore.kicad_pcb
-
basette / basetta_lineare / lineare_rev3 / alimentatore.sch
-
basette / basetta_lineare / lineare_rev3 / I2C&DAC.sch
-
basette / basetta_power_distribution / basetta_power_distribution.kicad_pcb
-
basette / basetta_power_distribution / basetta_power_distribution.sch
-
basette / basetta_power_distribution / logic_power.sch
-
basette / basetta_switching / SW48A2.kicad_pcb
-
basette / basetta_switching / SW48A2.sch
-
basette / basette_test / basetta_test_lineare / alimentatore.kicad_pcb
-
basette / basette_test / basetta_test_lineare / alimentatore.sch
-
basette / basette_test / basetta_test_lineare / pic_dac.sch
-
basette / basette_test / basetta_test_lineare / reference_supply.sch
-
basette / basette_test / basetta_test_lineare_ / alimentatore.kicad_pcb
-
basette / basette_test / basetta_test_lineare_ / alimentatore.sch
-
basette / basette_test / basetta_test_lineare_ / pic_dac.sch
-
basette / basette_test / basetta_test_lineare_ / reference_supply.sch
-
basette / basette_test / basetta_test_lineare_switching / test_lineare_switching.kicad_pcb
-
basette / basette_test / basetta_test_lineare_switching / test_lineare_switching.sch
-
basette / basette_test / basetta_test_parte_digitale / test_digitale.kicad_pcb
-
basette / basette_test / basetta_test_parte_digitale / test_digitale.sch
-
basette / basette_test / basetta_test_switching / old / LT3840_typical_application.kicad_pcb
-
basette / basette_test / basetta_test_switching / old / LT3840_typical_application.sch
-
basette / basette_test / basetta_test_switching / old / Buck-Boost-DCDC / Buck-Boost-DCDC.kicad_pcb
-
basette / basette_test / basetta_test_switching / old / Buck-Boost-DCDC / Buck-Boost-DCDC.sch
-
basette / basette_test / basetta_test_switching / sw_48@2_brd / 2017-02-08_13-07-06 / 2017-02-08_13-07-06.brd
-
basette / basette_test / basetta_test_switching / sw_48@2_sch / 2017-02-08_13-06-18 / 2017-02-08_13-06-18.sch
-
basette / nucleo_f303k8_altium / MB1180.PcbDoc
-
basette / nucleo_f303k8_altium / MB1180.SchDoc
-
basette / nucleo_f303k8_altium / MCU_32.SchDoc
-
basette / nucleo_f303k8_altium / ST_LINK_V2-1.SCHDOC
Last update 7 years 9 months
by
Carlo Maragno
Filesfirmwareprova_usart_forse.Xmcc_generated_files | |
---|---|
.. | |
eusart.c | |
eusart.h | |
i2c1.c | |
i2c1.h | |
interrupt_manager.c | |
interrupt_manager.h | |
mcc.c | |
mcc.h | |
pin_manager.c | |
pin_manager.h |
eusart.c/** EUSART Generated Driver File @Company Microchip Technology Inc. @File Name eusart.c @Summary This is the generated driver implementation file for the EUSART driver using MPLAB(c) Code Configurator @Description This header file provides implementations for driver APIs for EUSART. Generation Information : Product Revision : MPLAB(c) Code Configurator - 4.15 Device : PIC16F18323 Driver Version : 2.00 The generated drivers are tested against the following: Compiler : XC8 1.35 MPLAB : MPLAB X 3.40 */ /* (c) 2016 Microchip Technology Inc. and its subsidiaries. You may use this software and any derivatives exclusively with Microchip products. THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE TERMS. */ /** Section: Included Files */ #include "eusart.h" /** Section: EUSART APIs */ void EUSART_Initialize(void) { // Set the EUSART module to the options selected in the user interface. // ABDOVF no_overflow; SCKP Non-Inverted; BRG16 16bit_generator; WUE disabled; ABDEN disabled; BAUD1CON = 0x08; // SPEN enabled; RX9 8-bit; CREN enabled; ADDEN disabled; SREN disabled; RC1STA = 0x90; // TX9 8-bit; TX9D 0; SENDB sync_break_complete; TXEN enabled; SYNC asynchronous; BRGH hi_speed; CSRC slave; TX1STA = 0x24; // Baud Rate = 115200; SP1BRGL 34; SP1BRGL = 0x22; // Baud Rate = 115200; SP1BRGH 0; SP1BRGH = 0x00; } uint8_t EUSART_Read(void) { while(!PIR1bits.RCIF) { } if(1 == RC1STAbits.OERR) { // EUSART error - restart RC1STAbits.CREN = 0; RC1STAbits.CREN = 1; } return RC1REG; } void EUSART_Write(uint8_t txData) { while(0 == PIR1bits.TXIF) { } TX1REG = txData; // Write the data byte to the USART. } /** End of File */