BasicMicro - Forums

www.basicmicro.com
It is currently Mon May 21, 2012 12:29 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Nano28 taking too long to download
PostPosted: Tue Oct 25, 2011 9:35 am 
Offline
Citizen

Joined: Tue Oct 18, 2011 6:28 pm
Posts: 13
Hi,
I am newbie using the nano18/28 and no experience using the nano. I have the following problem. First I was using the nano18 everything was OKAY until I powered it down. It never come back. I switched to an spare nano28. The problem is that It's take about 4 minutes to down load the program. Since I am new using the nano I do not know how long it take to download it. The nano18 was few seconds. It this is normal for the nano28 take about five minutes to download. I am using Studio 2.0.0.15, Windows 7. Also I having problem reading an ADC LTC1293. I tried every mode combination possible and still I can not read it. I wrote a routine to read it with not problems. I like to use the shiftin because it is more faster reading it. Below is the routine I am using to read it.

' routine to read the analog TLV1293 converter.
low Clk : low Cs
shiftout Din,Clk,0,[ch_0\8] 'Send point to scan
pause 10
high Clk : tmp_var = 0
'shiftin Dout,Clk,0,[tmp_var\11]
For loop = 0 to 11
pulsout Clk,1
bit_in = IN2
tmp_var= tmp_var*2
tmp_var = tmp_var+bit_in
next
Regards
tauro0221


Top
 Profile  
 
 Post subject: Re: Nano28 taking too long to download
PostPosted: Tue Oct 25, 2011 12:18 pm 
Offline
Citizen

Joined: Tue Oct 18, 2011 6:28 pm
Posts: 13
More data for my problem. Scoped the data coming from the TLC1293 and the data read 3B5. Printed the data coming from the micro and shows the data is 63b5. Changed data pin same resulted. Conclusion the micro is setting bits 13 and 14. Worked around the problem by AND the data with FFF. That will clear the last 4 bits. Now the question is Does the NANO have a problem reading data using the shiftin command? Hope somebody have an answer. Anyway I am perfectly reading the analog input.
Now I need to fix the problem too long downloading the NANO28.


Top
 Profile  
 
 Post subject: Re: Nano28 taking too long to download
PostPosted: Wed Oct 26, 2011 10:29 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
It should take about 30 seconds to program a Nano28. Less for a Nano18. For the Nano18 that died you will need to send it back to be updated. If it is taking 4 minutes to program then it's aporbably your USB to serial adapter. If you are using one of ours with out driver you shouldn't have a problem. If you are using one of ours with an FTDI driver you need to adjust the latency to 1. Open the Device Manager, right click on the USB to Serial adapter and open iot's properties. Click Port Settings/Advanced. Change the Latency to 1.

If you are using some other brand USB to Serial adapter you will need to find out how to set their Latency. If the Latency is set hi it will greatly increase the amount of time it takes to program becaue it is adding milliseconds of delay between every byte sent and received when programming.

We had an older revision Nano18 that could in some situations erase it's boot entry causing it to not be able to be programmed anymore. This isonly an issue with Nano18s and only older ones.

As for the other problem, what version of Studio are you using? Make sure you are using the latest release(2.0.0.15 IIRC). I seem to recall and old bug that caused the high bits to be set but I don't remember if it was in shiftin. I know that it was fixed though.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Nano28 taking too long to download
PostPosted: Thu Oct 27, 2011 8:17 am 
Offline
Citizen

Joined: Tue Oct 18, 2011 6:28 pm
Posts: 13
Hi,
I followed your instruction about the latency and found that was set to 16. Change it to 1 and now the download takes about 30 seconds.That's fixed the problem. I am using Basic Micro Studio 2.0.0.15. I loaded it two weeks ago.

Do think that version 2.0.015 should fix the problem for the shiftin command setting the upper bits? It is possible that it didn't fixed it?

Thank you very much for you helpful advice.


Top
 Profile  
 
 Post subject: Re: Nano28 taking too long to download
PostPosted: Thu Oct 27, 2011 11:10 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
Are you reading in all 16bits at once or reading it in as 2 bytes?

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Nano28 taking too long to download
PostPosted: Thu Oct 27, 2011 1:52 pm 
Offline
Citizen

Joined: Tue Oct 18, 2011 6:28 pm
Posts: 13
Hi,
I am reading 11 bits. The instructions for the shiftin command said I can read from 1 to 32 bits default is 8 bits. I have a routine that also read the eleven bits by bits and the two bits also showed up when you display the storage variable. I zero the variable before shiftin read the data just in case but still the bits show up.


Top
 Profile  
 
 Post subject: Re: Nano28 taking too long to download
PostPosted: Thu Oct 27, 2011 2:40 pm 
Offline
Citizen

Joined: Tue Oct 18, 2011 6:28 pm
Posts: 13
Hi,
I read the ADC using 8 bytes and the bits 13&14 didn't showed up. Means that is only when reading more that 8 bits in one call.


Top
 Profile  
 
 Post subject: Re: Nano28 taking too long to download
PostPosted: Sun Oct 30, 2011 9:03 am 
Offline
Citizen

Joined: Tue Oct 18, 2011 6:28 pm
Posts: 13
More information about the shiftin command. If you execute the command without the ADC connected the bits 13&14 will showed in the input word sets.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 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