BasicMicro - Forums

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

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 8:51 am 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
Haven't seen any other posts with this problem so it must be something I am doing. The nano chips don't startup on power up unless I cycle the power a second time. This happens when the power has been off for more than 15 seconds. The chips just freeze and the programs don't run. I have added time delays etc in the first section of code to no avail. Is there some process that will ensure that the chips will startup every time? I am using a nano28 and the Nano Proto Board. Could the serial coms on startup be a problem?



pause 1000
'baud con i1200
'baud con i2400
baud con i9600
'baud con i19200

action var byte:motion var byte:servoNum var byte:value var word
LeftVal var word:CenterVal var word:RightVal var word:rver var byte
range var word:rst var word:spd var byte:i var byte:lt var word
ct var word:rt var word:
tdrval var word 'Time delay right
tdlval var word 'Time delay left
low 0:low 1:low 2:range=800:rst=600
pause 2000

'for i=1 to 6
readdm (i*(12+1)),[LeftVal.lowbyte,Leftval.highbyte,CenterVal.lowbyte,CenterVal.highbyte,RightVal.lowbyte,RightVal.highbyte,tdlval.lowbyte,tdlval.highbyte,tdrval.lowbyte,tdrval.highbyte,rver,spd]
'servo i-1,0-leftval,60

'cal:
'pulsout i-1,range
'pause 40
'range=range-10
'if range>800 then cal
'pause 100
'range=800
'pause1000
'next
servo 0,0-650,40:servo 1,0-650,40:servo 2,0-650,40:servo 3,0-650,40
pause 2000
serout s_out,baud,["*"]:pause 500
Main:

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 10:51 am 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
I found that forcing a reset (reset pin to gnd) causes the program to run every time. It just has something to do with a power up.

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 11:21 am 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
Hello, Harley. How many Nanos do you have? You say "chips" but go on to say you are using a single Nano28. My thought is the internal clock is not starting reliably upon initial power up. You should email support@basicmicro and take it up with them.
Later.

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


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 12:34 pm 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
I said chips because I have tried both the 18 and the 28 nanos and they have the same problem. I am using a single nano in the project. What I have now found out is that the chips start up reliably if I keep the usb adapter attached to the board. I can disconnect the usb cable from the adapter and leave only the adapter and they start up fine. If I remove the usb adapter the chips don't start up on power up. It must have something to do with the usb port and may put a partial load on it. Kind of a mystery. I would hope that I can run these chips in a stand alone environment without the usb adapter installed.

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 1:55 pm 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
Experimenting with the differences between no usb adapter and installed adapter, it would appear the there needs to be some load between ser and res on the serial connector. I ended up at this point, installing a 1 meg resistor between ser and res on the usb port and at this point, the chip is starting up flawlessly. I will keep re-powering to see if this is for sure the fix. It then brings up the question as to how to insert this resistence on stand alone and remove it when the usb adapter is installed. Its possible that with the adapter removed, the ser pin is floating and that may be the problem.

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 3:19 pm 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
I think you may have nailed it. I checked the prototype board's schematic. There is a pullup on the reset but not the serial line. When you first power these up, the builtin bootloader looks for serial traffic from the host computer. A floating serial input may have noise on it that is "jabbering" nonsense to the bootloader, so it does who-knows-what. When you bridge another resistor between the reset and serial lines you provide a signal level that keeps this from happening. Remove the 1 meg resistor and install a 10K (up to 100K) pullup resistor from 5V (Vcc) to the serial (TX/RX on the schematic). Bridging this resistor from the Vcc pin to the serial pin of any Nano socket will do.
Later.

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


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 3:30 pm 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
Thanks Ken, I will try that and I also emailed support as you suggested. If this is a problem they may mod the pcb on future versions. I'll let you know if the pull up resistor helps.

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 5:43 pm 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
Bingo! That appears to have cured the problem. It probably would be good to note it somewhere so that if a pcb is designed the pull up resistor can always be there. Its a must for stand alone setups. Thanks again.
Note:used a 10K

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Tue Apr 20, 2010 8:07 pm 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
Most excellent! This probably came about because the old Atom DIP chip dev boards used RS232 to program and communicate with, so had a diode and pullup to "merge" TX and RX after they passed through the MAX232 level translator IC. That circuitry now exists on the Nano Serial Comms/Programmer adapter, so slipped someone's attention no doubt. Remove the adapter, the pin "floats".
Later.

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


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Wed Apr 21, 2010 10:26 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
I know what the problem is. The boards with the built in USB chips is the cause of the problem. The FTDI USB chip holds it's pin in what the Atom sees as a reset state when there is no USB cable plugged in. If you are using one of the USB boards that have the rs-232/USB jumpers on it just remove the jumpers when using the board without using the USB connection. Then the onboard POR circuit can work correctly.

Note the reason this is a problem is because the Nano bootloader expects the s_in pin to be low on reset to start going into the bootloader mode. If the USB chip is pulling the pin low because it is disconnected from the PC when the Nano resets then the Nano will go into boot mode and will not run user code.

Putting another pullup(there is already one on the Nano boards) on the s_in pin appears to also fix this. It adds enough pullup so the s_in pin is not held low on reset.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Wed Apr 21, 2010 11:28 am 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
And you can always unplug the Nano programmer adapter, if your board uses that. Unless you plan to use it for serial communications when running code, in which case it is plugged into a live USB port and so not a problem as mentioned here.
Later.

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


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Thu Apr 22, 2010 10:18 am 
Offline
Guru

Joined: Fri Nov 13, 2009 10:28 am
Posts: 82
Location: Reno, Nevada
The board I am using(BasicATOM Nano Proto Board RevB) doesn't have a 232 port or jumpers and will only start reliably with a pullup resistor on the Ser pins of the Nano chips. If I leave the USB adapter plugged into the board it will also start up most of the time. For stand alone ops I will install the 10k pull up on the Ser pin which solves all startup problems. Thanks for the info and the help.

_________________
Harley


Top
 Profile  
 
 Post subject: Re: Nano chips don't run on power up
PostPosted: Fri Apr 23, 2010 7:02 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
For those boards that don't have the jumpers then the pullup is the only option. Basically what is happening is the FTDI is bus powered on most boards. So when you don't have it plugged in it puts some load on the s_in pin of the Nano chip. The Nano dev boards have a pullup on this pin but they don't pull up enough by themselves to counter the load of the unpowered FTDI chip. Adding another 10k pullup appears to add enough umph to get the S_IN pin high when powered on.

For those that are just getting here, the S_IN pin MUST be high on power up of the Nano chips. This is not an issue with AtomPro modules. Atom modules show a similar problem if their s_in pin is attached to an RS-232 port that is holding the pin in the BREAK state during power up. This BREAK state is the first phase of entering bootmode on the Nano/Atom modules.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


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