Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20606

BASCOM-AVR : Getting Xmega128A4U usart0 working : REPLY

$
0
0
I have been using xmega for a few years now. I have not used "xm128a4udef.dat" this particular part. $regfile = "xm256a3def.dat" 'if I ever write enough code '$regfile = "xm192a3def.dat" '$regfile = "xm128a3def.dat" 'low cost option $crystal = 32000000 '32MHz $hwstack = 128 $swstack = 128 'multiples of base 16 $framesize = 256 $loadersize = 8192 'reserve 8K byte for Bootloader code '$loader = &H20000, bootloader starts after the application ''not required for BASCOM-AVR 2.0.7.4 and later!! '$lib "xmega.lib" : $external _xmegafix_clear : $external _xmegafix_rol_r1014 'this is the customized LCD assembler code to use vport 0 in 4 bit mode, 'found in C:Program FilesMCS ElectronicsBASCOM-AVRLIB $lib "lcd4e2busy.lib" '-------------Read in constants, variables, sub declarations-------------------- $include "DSP-Radio-Media_const_vars_declare.inc" '-----------------------------CLOCK CONFIGURATION------------------------------- Config Osc = Disabled , 32mhzosc = Enabled '32MHz and 32KHz enabled Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1 'CPU Clock = 32MHz '--------------------------------CONFIGURATION---------------------------------- Config Eeprom = Mapped 'must be used for Xmega EEPROM 'COM Interface to PC via USB using FT232RL ('com1 is located on Port C,PC2=RXD,PC3=TXD) Config Com1 = 38400 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8 '38400 for PC application support 'Config Com1 = 115200 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8 Open "COM1:" For Binary As #1 '{027}[K Erase Line: '{027}[2J Erase Display: Print #1 , "{013}" ; "{010}" 'send a <cr> & <lf> Print #1 , "RCS Portable Radio/Media Player FW v1.0.0.2" 'start up banner

Viewing all articles
Browse latest Browse all 20606

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>