Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Rainbow led and code placed above 64Kb

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
hoogscherm

Bascom Member



Joined: 17 Jul 2008
Posts: 3

belgium.gif
PostPosted: Mon Feb 25, 2019 8:39 pm    Post subject: Rainbow led and code placed above 64Kb Reply with quote

Is there a way to use the ws2812 rainbow leds when the code is placed in memory above 64Kb?
I want to use a rainbow-led into a bootloader-utility for the atmega1284, meaning my code needs to be placed in memory adr starting at $F000

Code:
$regfile = "m1284pdef.dat"
$crystal = 8000000

$hwstack = 60
$swstack = 128
$framesize = 128
$baud = 57600
$loader = $F000                         ' As soon as this value > $8000, the led isn't working
' using either the old or new lib makes no difference
' $lib "RainbowBSCN.lib"
'$lib "RainbowBSC.lib"
Config Rainbow = 1 , Rb0_len = 1 , Rb0_port = Portb , Rb0_pin = 0
'                                                   ^ connected to pin
'                                       ^------------ connected to port
'                         ^-------------------------- 1 leds on stripe
'              ^------------------------------------- 1 channel
Rb_selectchannel 0                      ' select first channel
Dim Rgb_blue As Dword : Rgb_blue = &HFF0000
Dim Rgb_red As Dword : Rgb_red = &H0000FF

Do
    Print "red"
    Rb_setcolor 0 , Rgb_red : Rb_send
    Wait 1
    Print "blue"
    Rb_setcolor 0 , Rgb_blue : Rb_send
    Wait 1
Loop

End


Using the code on ATmega644 and $loader=$7000 works without a problem.
For the ATmega1284P my bootloader starts on $F000.
If I use $loader=$XXXX and XXXX if less then 8000, the code works.

Thanks,
LucVdV

(BASCOM-AVR version : 2.0.8.1 )
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR 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