Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Bascom 2.0.7.7 RC5 - Xmega256A3U Problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
lixibert

Bascom Member



Joined: 30 May 2009
Posts: 1

austria.gif
PostPosted: Mon Apr 14, 2014 7:50 am    Post subject: Bascom 2.0.7.7 RC5 - Xmega256A3U Problem Reply with quote

Hello,

i have tried this code on my Xmega256A3U Board and it worked well.
Unfortunatly this was a while ago with an older Version of Bascom (i don`t know if it was 2.0.7.6or earlier)

Now i found some time to go on with this Project but it isn`t working with the newest version of Bascom.

Please could someone check this?

Im using a TSOP38238 Receiver and it worked well with an older Version of Bascom.

Kind regards, Michael

Code:
$regfile = "xm256a3udef.dat"
$crystal = 32000000
$hwstack = 64
$swstack = 64
$framesize = 256
$lib "xmega.lib"
$external _xmegafix_clear
$external _xmegafix_rol_r1014

Const Comport = 2

Config Osc = Enabled , 32khzosc = Enabled , 32mhzosc = Enabled
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
'Switch on DFLL (Both 32M and 2M, see Errata for 128A1
Osc_dfllctrl.0 = 0                                          'Internal 32kHz
Osc_dfllctrl.1 = 0                                          'Internal 32kHz
Dfllrc32m_ctrl.0 = 1                                        'On
Dfllrc2m_ctrl.0 = 1                                         'On

Config Priority = Static , Vector = Application , Lo = Enabled , Med = Enabled , Hi = Enabled

'#*********************** PORTA ************************************************
Config Porta = Input

'#*********************** PORTB ************************************************
Config Portb = &B0000_1110

'#*********************** PORTC ************************************************
Config Portc = Input

'*********************** PORTD *************************************************

Config Portd = &B10110001

'Infrared Receiver
Config Xpin = Portd.1 , Outpull = Pullup , Sense = Falling  ' Pullup on IR-Receiver
Config Rc5 = Pind.1 , Wait = 2000

'#*********************** PORTE ************************************************
Config Porte = &B01011000
Config Xpin = Porte.5 , Outpull = Pullup , Sense = Both


Config Com5 = 38400 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Open "COM5:" For Binary As #1

'#*********************** PORTF ************************************************
Config Portf = &B00001000
Config Com7 = 9600 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Open "COM7:" For Binary As #2


Dim Adress As Byte , Command As Byte

Enable Interrupts

Do

   Print #comport , "waiting for RC5..."

   Do
      Getrc5(adress , Command)

      If Adress = 0 Then

         Command = Command And &B0111_1111
         Print #comport , Adress ; " " ; Command
      End If

   Loop Until Command = 9

Loop

End


(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum