BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Tue Oct 23, 2018 3:09 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Studio suggestion. More of a convience.
PostPosted: Thu Sep 30, 2010 9:13 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
Write a tag into the BAS file as well as the active TABs that remembers the chip selected.
I, like many people use multiple micro controllers.

I'm constantly forgetting to switch it from Nano, to Atom Pro at the top.
So when i go to program my atom pro, it gives me hservo errors cause it's set to Nano 18, at the top.
Would be a bit more convenient for us forgetful types.
Else allow us to write a note or comment that will auto set it in the Studio.

setmcu pro28

setmcu nano18

or nano40, arc32, pro32, atom24.. you get the idea.
So when i hit build, or program, it'll automatically switch it at the top before actually building/programming.
Logically it sounds like it would be easy to do.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convince.
PostPosted: Thu Sep 30, 2010 4:45 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Maybe use the same defines that the compiler defines for you. That is for example if you currently compile for a Basic Atom Pro 28, the compiler currently automatically defines
BASICATOMPRO28

I use this in my code to configure several things. So maybe if this is already defined in the program it uses it? The question would you expect it have to search the entire program to find this or does it need to be defined as the first line of the file?

Kurt


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convience.
PostPosted: Fri Oct 01, 2010 1:55 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
Set on the first line, it would be optional of course.
If people don't include the line, it'll simply use what ever is selected in the studio.

Another addition, would be to add the programming port. For atom pros, i use com1, for nanos i use com3, since it goes through a TTL converter which i happen to have connected to my usb com adapter. I use a bunch of usb to serial adapters. The PC i use for programming is a Clevo Co LP2000c or what ever, it's one of those all in one LCD computers, so it has PCMCIA and a mini PCI slot, no normal PCI ports for one of those sexy pci to 4x HW-serial port cards.

Really it's more for convenience for people that work with multiple different MCU's.

I'm not sure i understand you,
If you have it defined when you make the file, it wont be so easy to change it, IE code you originally wrote for a pro28, and you want to move up to a pro40, you'd have to make a new file, where as if it was an inline code, you change 2 numbers and then go on about your programming.

I wouldn't want it to auto detect the MCU prior to programming, simply as it's time consuming, up to 1minute in some cases.
Just a simple incode command that the studio can recognise that would dictate whether it's building/programming for a nano, pro, arc32 ect.

Again it would be optional, people that only own a pro28, would set it at the top once, and forget it. It's more or less just for those of us with multiple atom types.
I only say this because i kept getting errors in my programming for my atom pro, because i didn't realize i had it set to nano, i kept tweaking the code, to finally realize there was nothing wrong with it.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convience.
PostPosted: Fri Oct 01, 2010 8:18 am 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
What you're suggesting is to just get rid of the selections menu for the Atom types and have Studio query the COM port to get the part to ID itself. Studio does that now when you start a compile and and have set the model type to "auto", but the user is still made to select the part category first, ie, Atom, Nano, or Pro. You would seemingly go one step further and have the COM port query settle the question, forget setting the first selection about category manually.

I'm sorta for that, but one of my large past frustrations years back was being forced to have an Atom connected to a COM port and powered up before doing just a general compile, forget the programming. Now, if you set the category and part type first, you don't need to connect any part to any COM. You could be sitting with your laptop on the commute bus writing and compiling code and do syntax checking and such. Then, when you get home, you just plug in the dev system board, power it up, and start programming.

So, let's not get rid of the selections entirely.
kenjj

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


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convience.
PostPosted: Fri Oct 01, 2010 4:35 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
The very first Atom IDE queried the part for it's type. But we had a whole lot of people that want ed to compile without a chip attached so, enter the selection drop down. Auto mode does still auto quetry the part to determine the module type.

As for the processor tag selection I am looking at how best to implement it. I think I'll go with the same method as was used in the old MBasic IDE. A readonly line at the begning of the program that can only be changed by changing the chip selection dropdowns. Don't expect it in the next release but probably in the one after that.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: select processors, new sensors
PostPosted: Fri Oct 01, 2010 6:21 pm 
Offline
Master

Joined: Tue Jun 22, 2010 9:15 pm
Posts: 228
That's a very good point. I've experienced the same frustrations in the past, and am happy to make the selections via either the menus or a "processor statement" in the code.

I'd also like to suggest (maybe already possible with shiftout) accommodations for the TPA81 thermopile sensor and TSL1401 line sensor camera.

Or perhaps someone has code for the BasicAtomPro?

Alan KM6VV

Edit: TPA81 is I2C.

kenjj wrote:
<snip>
I'm sorta for that, but one of my large past frustrations years back was being forced to have an Atom connected to a COM port and powered up before doing just a general compile, forget the programming. Now, if you set the category and part type first, you don't need to connect any part to any COM. You could be sitting with your laptop on the commute bus writing and compiling code and do syntax checking and such. Then, when you get home, you just plug in the dev system board, power it up, and start programming.

So, let's not get rid of the selections entirely.
kenjj

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convience.
PostPosted: Sat Oct 02, 2010 11:03 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
Quote:
What you're suggesting is to just get rid of the selections menu for the Atom types and have Studio query the COM port to get the part to ID itself.


I thought i was clear when i said i DONT want this, because it could take upwards of a minute on some computers.
Especially one with many comports, hardware, usb or emulated.
"I wouldn't want it to auto detect the MCU prior to programming, simply as it's time consuming, up to 1minute in some cases."

What i want, is the ability to insert an OPTIONAL command into the code, top line, that could change the selection prior to building/programming.
Possibly a code that would extend to selecting the com port.

EXAMPLE
If i'm making a program for my Atom Nano 18. The very first line of my code would be
setatom nano18,com3
Then when ever i would build or program the nano, it will automatically set at the top, nano 18 on com3.
Then if i were to switch tabs to my atom pro, it would have
setatom pro28,com1
Then it would auto select the atom pro 28 from the list, and use com port 1.

This does not replace the drop down list, or make the drop down list redundant. I'm sure a lot of people, especially new users like the drop down list. I do.
I'd just also like for my code to be able to auto correct my forgetfulness of switching ports and micro controllers.

The auto query is fine for PROGRAMMING it could "double check". but i don't have my micro controllers connected or powered while simply writing the code, and i build hundreds of times, just for error checking. I wouldn't want it to query my micro controller every time i build the thing, but i do want it to build for the right micro controller. As you get errors in the nano, that you wouldn't see on the atom pro, hservo for example.
So a simple command that could change those settings would be very helpful. It's the simple mistakes that i get caught up on the most. When an error pops up, i assume it's with my code, maybe i did something wrong.. I'm a bit pessimistic in that sense.

Think of it this way. The Check Engine light comes on in your car, you spend hours of your own time, checking the engine, and find nothing wrong, you take it to a mechanic, he finds nothing wrong. The problem... The Check Engine light controls are malfunctioning.


Edit:
setatom chip,com#

atom24
pro28
arc32
nano28

etc.
the com label is pretty self explanatory.
For my main PC including the 2 junk com ports BlueSoleil adds, + the 1 actual comport i use for bluetooth, my main PC has 6 com ports.
I cant remove the 2 junk com ports, or change their numbers.

The PC i do most of my programming on, 3-4.. It'll have even more once i get a newer version of bluesoleil for my other usb bluetooth dongle.
So i'll be looking at 6-7. It's ridiculous.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convience.
PostPosted: Mon Oct 04, 2010 10:29 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
From experience I will never allow typed code in the .bas files to set the processor type again. I will, however, try to put back in a chip setting (and add a comport setting) that when you click the chip type/comport in the drop down sets the currently selected file to that chip/comport. Then when you open or compile that .bas file it will use those settings. This setting will be stored as a readonly setting in the bas file that can only be changed by the dropdowns. Not sure how long it will be before you will see this in Studio.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convience.
PostPosted: Tue Oct 05, 2010 5:36 pm 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
That's fine.

As long as it isn't permanent to the file.
Should someone write the code for the atom, and then decide to move to the atom pro.
Having to create a new file and copy/pasting everything isn't any fun, it's not hard, it's just not fun. Especially for people not aware of the feature.
People unaware of any sort of file based setting will find themselves majorly confused should they want to write that file to a different processor.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convience.
PostPosted: Tue Oct 05, 2010 8:32 pm 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
I would like to see:
When you run the processor locator under tools/preferences, have the info for the found processor automatically entered in the selections on the main page.
Better yet, put a button on the the "processor not found" window that pops up, that does this locating from a simple click. That way, when someone runs into the different-processor glitch, the solution is one click and confirmation of detected device. And add this same button to the main page as a convenience.

If the above isn't doable, my vote would be to leave things the way they are.
Thanks for the attention.

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


Top
 Profile  
 
 Post subject: Re: Studio suggestion. More of a convience.
PostPosted: Wed Oct 06, 2010 8:30 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
I kind of like that idea of, if it's set wrong, have it popup with the confirmation window that will then auto detect it. But this only works if it's set to the wrong processor and you're programming.

What kenjj keeps missing, is, for when it's building, without a processor connected.


If your Studio is set to nano and you're doing hservo stuff for the pro and you goto build, it'll give you errors as the nano doesn't support the hservo.
The studio won't automatically "assume" you're building this program for a pro. So there needs to be some sort of indicator either behind the scenes in the bas file, or upfront in the code.

It's not really top priority, there are other bugs i'd like to see prioritized above this. But a month from now, or 2 months from now or early 2011, i'd like to see this introduced.
Now then, after having run into this problem and having spent hours trying to figure out where i went wrong in my code, i won't let it happen again, learn from ones mistake. But this suggestion is more aimed at other users now. I won't make this mistake, at least not so carelessly, but others will.

The mistake i make the most now when it comes to the drop downs, is the com port, since i program the nano with com3 and the pros with com1.
i use a 4 pin header to program the Pro's, not a normal d-sub plug, so i use an old serial line with a 4pin female header sticking out.
the nano on the other hand uses the same style connector, but needs to pass through a rs-232 to TTL converter.

_________________
Image
Basic Micro Blog
Universal Robot Controller


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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