BasicMicro - Forums

www.basicmicro.com
It is currently Sun May 20, 2012 11:41 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Studio/2.2.1.1 compatibility
PostPosted: Fri Nov 27, 2009 1:52 pm 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
Not sure if I am on the right forum, but I have a section of code that works using 2.2.1.1, but when I compile the program using Basic Micro Studio, it doesn't work. The code is listed below and should monitor IN13. If IN13 is low, the program will continue. It appears that in the Studio version I am not monitoring IN13 and it never sees a 1 on IN13. May be syntax? Have played with the timing with no improvement. Also the number of compiled lines is double the number of 2.2.1.1. Is that normal?

FOR I=1 TO 10
IF IN13=0 THEN GOSUB seti
SERIN s_in,baud,40,cont1,[DEC3 ISDCMD]
cont1:
NEXT
IF DABIT=TOT OR ISDCMD=148 THEN GOTO LOOP1
SERIN s_in,baud,500,cont2,[DEC3 ISDCMD]
cont2:
DABIT=DABIT+1
GOTO TESTPLAYBACK
GOTO LOOP1

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Fri Nov 27, 2009 3:50 pm 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
Hello hemicro.

I need the full code. I can't just insert code until it works. This incomplete code fails on:
- missing labels
- undefined variables (Like, "I var byte")
- etc.
That's interesting that it reports more lines then the 2211 compile. Maybe the compiler's report function is dinged?
Happy holidays!

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Fri Nov 27, 2009 4:11 pm 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
I will try to reinstall the Studio and see what happens. When compiling there are no errors and the report shows 736 lines compiled and with 2.2.1.1 there are 428 lines compiled. The entire program is very long and compiles with now errors in either IDE. The only reason I would use the Studio is that I want to try at some point to use the nano chips and replace the BS2's I am currently using.

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Sun Nov 29, 2009 6:59 pm 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
Reinstalled the Studio and have the same problem. I also tried using version 5. and have the same problems as with Studio. The app works with version 2, so there has to be some difference in the compiling area. The lines compiled also varies from either the Studion or version 2-The number of lines compiled must be computed differently between versions and probably isn't part of the problem. I appears that the the routine for monitoring IN13 is not operational. The port has to be good, since it is monitored in version 2. Will keep working on it and let you know if I come up with anything. There may be something in the for/next loop handling that is different between versions.

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Sun Nov 29, 2009 8:54 pm 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
What kind of Atom are you using? How many pins? Module or IC? RevB or RevD?
A revB will use a PIC16F87x, while a RevD has a PIC16F88x or PIC16F88(Nano18). You may have to remove a label to see the info on top of the processor IC.
I have just about one of everything. I should have the Atom type you are using, and all three compilers.

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Sun Nov 29, 2009 10:35 pm 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 527
I don't have an Atom that works with studio (lots of pros...)

Also since I don't see the whole program I don't know what stuff has been properly set up.

For example: do you have a statement like:
input p13

Somewhere in the code before this segement of code. This might help to make sure the pin is configured to be an input pin.

Also I don't remember with the atom, but I know with the Pro, timeouts changed from milliseconds to something like .5 microseconds, so you jmay need to change your timeouts on the Serins...

good Luck
Kurt


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Wed Dec 02, 2009 11:40 am 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
I have the program working now and it is apparent that the timeouts are the problem. This is a difference in the IDE version 2.0.0.1 and the Studio version. The count had to be changed from 10 to 100 and the serin timeout had to be changed from 40 to 40000. It now works as designed and I am trying to find some info on the time out differences between IDE versions. I am using a BasicAtom 24. The syntax manual I have lists the times as milliseconds, but from the changes I had to make it may be that the IDE is set up for microseconds? I recall having timing function problems a couple of years ago when doing some serial com conversions from BS2 to AtomPro, so I'm sure Kurt is correct. Thanks for your help guys!
Harley



FOR I=1 TO 100 'Requires 100 versus 10-skips messages if set to 10
'10 works with ver. 2.0.0.1
IF IN13=0 THEN Gosub seti
moveon:
SERIN s_in,baud,40000,cont1,[DEC3 ISDCMD] 'Requires 40000 instead of 40-skips
'messages if set to 40. 40 works
'with ver. 2.0.0.1
cont1:
NEXT
IF DABIT=TOT OR ISDCMD=148 THEN GOTO LOOP1
SERIN s_in,baud,500,cont2,[DEC3 ISDCMD]
cont2:
DABIT=DABIT+1
GOTO TESTPLAYBACK
GOTO LOOP1

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Wed Dec 02, 2009 11:55 am 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
I went back thru my records and actually it was in 2004 that I was working the AtomPro and at that time the timeout problems were related to "code inside a gosub/subroutine". They said that this limitation would be eliminated in a new release of AtomPro software. Don't know if that happened for sure but the version 8 help manual in the Studio program still lists timing as being in milliseconds.

Harley

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Wed Dec 02, 2009 3:55 pm 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
Yep. All manuals are out of date. The new versions are being done up and unavailable.
To my recollection, only PAUSE is still in milliseconds. All timing, pulse and counter functions are in microsecond or 0.5 usecond increments. You'll have to experiment to get proper results. As a generality, if it isn't PAUSE, multiply your values in examples or old code by 1000. If that's not quite right, double them.
Have fun with your project.

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: Studio/2.2.1.1 compatibility
PostPosted: Wed Dec 02, 2009 8:40 pm 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
The multiply by 1000 seems to be the answer as evidenced by the 40 timeout in the serin having to go to 40000 to work. Thanks again

Harley

_________________
Harley


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO