Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

"IF-THEN" problem

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

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Mon Nov 24, 2014 7:24 pm    Post subject: "IF-THEN" problem Reply with quote

This string is works wrong:
Code:
If A <> B Or C = 1 Then

If A>0 and B>0 all works correctly, but if A=0 and B=0, the part "C=1" is ignoring.


(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Mon Nov 24, 2014 10:03 pm    Post subject: Reply with quote

It's testing well, you're wrong.
Back to top
View user's profile
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Tue Nov 25, 2014 12:34 am    Post subject: Reply with quote

On chip with RAM <64k it works well, but I use AT90USB1286.
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Tue Nov 25, 2014 12:57 am    Post subject: Reply with quote

Mrshilov wrote:
On chip with RAM <64k it works well, but I use AT90USB1286.

Ah, informations slowly dripping in...
When does it show these behavior, as flash is empty, or filled above 64k?
Back to top
View user's profile
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Tue Nov 25, 2014 3:53 am    Post subject: Reply with quote

Yes, above 64k.
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Tue Nov 25, 2014 9:44 am    Post subject: Reply with quote

I do not see what it could have to do with 64K (rampz). But if it is reproducible, i suggest to send the code to support (zipped) so we can have a look at it.
_________________
Mark
Back to top
View user's profile Visit poster's website
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Tue Nov 25, 2014 2:52 pm    Post subject: Reply with quote

Mrshilov wrote:
On chip with RAM <64k it works well, but I use AT90USB1286.

Tested with $Regfile = "usb1286.dat", then the first test-code, then a 70kByte data block, then the second test-code.

This has the effect, that Bascom-internal code is placed into second page, first test-code runs on first page, second test-code on second page.
All tests well, no problems.
Back to top
View user's profile
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Mon Dec 01, 2014 4:06 am    Post subject: Reply with quote

I found mistake in my code. Now all works fine.
Topic may be deleted.
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