go_away

Author Topic: 8 characters in the path or file name ? and starting AXON not on USB...  (Read 1577 times)

0 Members and 1 Guest are viewing this topic.

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
I can download a program with the FBOOT GUI (that just rolls off your tongue doesn't it) that has more than 8 charaters in its path and file name but I thought I remembered reading something about an 8 charater limit.  But, it will only start up if the board is connected to the USB and the computer is powered on.

It seems unlikely this has to do with any character limit (there are no spaces).

Anyway, at "power on" the program starts fine if the USB is plugged in.  If not, it doesn't want to boot up and the program will not run.  Program size is about 32K using a DroneCell/GPS/Display/Keypad configuration, like a homemade cell phone.  Homemade cell is pretty worthless if I have to lug around my laptop too  ;D

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
The 8 character limit is if you use the FBOOT17.exe directly. I don't recall why.  But it's one of the most frustrating things to forget about, and then subsequently lose hours tracing the problem down.

I'm not sure what's up with the actual problem you're describing... Are you using the USB's UART in your code? I've had problems (Axon light flashing, webbotlib error) when I use the other UART's in code, but don't have the physical UART's connected to anything.
I

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
You are using the original Axon, right? Check your battery, the wiring, and make sure your grounds are all connected.

If you plug in USB, and your robot works, then you unplug USB without turning your robot off . . . does the robot stop working?


The file name size limit, I believe but am not 100% sure, is because FBOOT is an 8-bit program. I didn't write it myself.

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
Yes just the Axon, not Mote or II, just Axon.

I am using the 4 UARTs. 
1 for the USB connection
1 for a GPS module
1 for a DroneCell modem
1 for future expansion to OBD II data.

I will text, if I can figure out a way to get SMS into MySQL, or use a TCP connection to get the data to a record in MySQL but that's a story for another day.

If the Axon is connected to the computer via the USB and download a program it runs fine, and even if I shut down and restart the board via the switch (which is VERY convenient BTW) it still runs fine.  All I need to do is have the USB plugged into a live computer.

If I unplug the USB, after checking just now and playing some more is I get weird characters on the LCD which in adjusting a delay on startup goes away except for I now have a flashing block as the location of the cursor so I need to figure out how to turn that off because it's bothersome. 

But it appears to be working for whatever reason with the delay and perhaps there is a command I need to send to the LCD to turn off blinking cursor but I will check that out. 

This is somewhat LCD influenced because USB plugged and poewered inits with a blank LCD and unplugged inits with rows 0 and 2 black box and 1 and 3 as clear instead of all clear when plugged into the USB, and as I said powered up.

For whatever reason having the USB plugged in and laptop powered up is the key, like it needs that power to the LCD or something.  I'm running off a wall transformner that's at 6VDC output that is poretty clean according to the scope so power should be no problem on droops etc, although I haven't confirmed that and maybe it's charing the big cap.  Is that the thing?


Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Thanks for extra info.  I was referring to using the UARTs in your software.  Is the code on the Axon using the USB connection?

Can you also verify like Admin noted, that all of the grounds are common (aka connected)?
I

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
All grounds are connected by pluggin leads and are pretty solid.
Grounds for the LCD are on the 5V regulated strip
Grounds for the GPS are on the 5V regulated strip
Grounds for the DroneCell are on the 6V (battery) strip

Yes the code is using the USB UART.

I'm beginning to suspect the capacitor charging time constant but does that explain the blinking cursor?  I need to figure out how to set the default for that.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
I am using the 4 UARTs. 
1 for the USB connection
1 for a GPS module
1 for a DroneCell modem
1 for future expansion to OBD II data.
Is the LCD also using an UART?


Quote
If I unplug the USB, after checking just now and playing some more is I get weird characters on the LCD
You mean after you turn everything on, then you remove the USB, right? And then the only error you get is weird characters?

But if you never had USB in at all, nothing happens? ie no LEDs turn on, etc?


Are you using the SPI pins, or I2C?

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
LCD is not using a UART.  4 line connection, no serial LCD.

Maybe I misspoke.  If I unplug the Axon after starting connected to the PC USB with power on the PC everything works fine, no problems.

It's only when I start/power up by the switch with USB unplugged and only getting power from the wall transformer that I get strange LCD behavior and on a rare occasion nothing comes up on the LCD although something is happening as LED blinks.  I am getting more and more convinced this is a problem caused by charging the big cap.  Is that possible?  Maybe I should just sit idle for a bit longer at init.

A quick check of time constant on the cap.... at a 1K load that 3300uF cap has a time constant of 3.3 seconds, scales proportionate to that for higher loads.  2K is 6.6 vseconds and so on.  And, that's just to get to 63% charge.  Tomorrow I will try to get a trace on the scope to see what the voltage is doing, should have done that first I guess. 

Does the USB connection actually keep the capacitor charged?

SPI is setup in the project from Project Designer (Webbotlib) but not yet implemented for an SD card, so no connections to those pins yet.






Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
What is your current draw? Yea, definitely see what the voltage is doing. Your wall wart could be acting funny.

Quote
It's only when I start/power up by the switch with USB unplugged and only getting power from the wall transformer that I get strange LCD behavior and on a rare occasion nothing comes up on the LCD although something is happening as LED blinks.
Ok, so everything else works fine, but just the LCD acts strange?

Do you have the LED blinking in your code? A blinking LED could mean your mcu is resetting.

Quote
SPI is setup in the project from Project Designer (Webbotlib) but not yet implemented for an SD card, so no connections to those pins yet.
Disable the SPI in PD and see if that has any effect.

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
I'm not using a debug adapter so I can't see what registers or ports are doing but....

infrequently but it has happened.....  yes the LED blinks but not like it's resetting in fact it's very rythmic 8 flashes and a pause, 8 flashes and a pause, and so on that may have originated by a reset, but the flashing doesn't occur every power up.  I suspect there is a timing issue with the DroneCell also doing an init and not related to anything else.

The real manifistation of odd behavior is what the LCD does during power up (with or without the USB plugged in) and ultimately do I have a blinking cursor or no blinking cursor.  I don't mind the blinking cursor, but would prefer to be able to turn it on or off with software, not left to chance.  So, before I go on with this I need to resolve this LCD issue. 

I'll check voltage across the cap tomorrow and try to get a current reading.

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
voltage comes up quickly and actually a little overshoot but settles in after a couple of seconds.

I'll get back here after I get some of the routines of the DroneCell under new program control again.

In the meantime I'd settle for controlling the blinking cursor  :)

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Regular flashing LEDs mean errors.  See the errors.h file in the Webbotlib 2.0x folder.  Going by my understanding of the comments in that file, 8 flashes means you're getting this error:
Code: [Select]
// There is no appropriate prescale value for the frequency you want
#define NO_APPROPRIATE_TIMER_PRESCALE_VALUES -8

Which I have no idea what that's referring to  :-X

This error can also be verified if you have the UART assigned to error messages (assigned when you generate the project code) hooked up to Hyperterminal or PuTTY (or similar) on the computer.  What I see when I have errors is "WebbotlibError: 11", or something like that...

--------------

There's also a way to do a remote reset of the Axon without actually toggling power. Admin knows more about that.  This might help indicate if it's a problem related to the capacitor.  The test would go like this:
1. USB plugged in, power axon on, display works
2. Unplug USB
3. Trigger Axon reset (again, I don't know how this step is done)
4. ???
I

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Yeap, Gertlex is right, it's a WebbotLib error preventing the running of your code.

Lester, can you upload your Project Designer .prj file and .c here? Did you do anything unusual in your C code that involved timers?

To trigger a manual reset, you just short two pins on the ISP connector (RESET with GND).





edit: fixed typo
« Last Edit: June 21, 2012, 03:01:19 PM by Admin »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 109
Yeap, Gertlex is right, it's a WebbotLib error preventing the running of your code.

Or more precisely - WebbotLib is trying to report an error as to why your code isn't working. Not necessarily a problem caused by WebbotLib - but may be something Project Designer could alert you about beforehand. It could be that you are trying to use the same timer for lots of different things - some quick and some slow. Hence the 'NO_APPROPRIATE_TIMER_PRESCALE_VALUES' error - ie - it cannot set up the timer to cope suitably.

Without at least a Project File (.prj), and preferably some code, then its just speculation.

@Lester: if you don't want to post it on this website for any reason then feel free to email it to me direct.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
oops, sorry for the confusion . . . I meant 'WebbotLib Error Message' . . .

 ;D

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
thanks everyone, sorry to get back so late.  have been swamped with work and at the moment in NY but will get home late tomorrow.

I will get to it as quickly as possible, really really appreciate the comments.  No problem posting my code and project file if no one laughs hehehe....

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
I am beginning to suspect the timing issue is the source of the error codes.

My project file is attached as a .txt I suppoose a simple rename to prj will suffice?

My sincere apologies for the delays but work is upside down with layoffs etc and reorg so first things first.  If there is something odvious in my project file I'd appreciate  aheads up.  I will get back on it in due course.

<!DOCTYPE project SYSTEM "http://webbot.org.uk/webbotlib/dtds/project_V_1_1.dtd">
<project board="jar:file:/C:/Webbotlib/Project_Designer/ProjectDesigner.jar!/boards/Axon.brd" cpp="true" errordev="Display" printf="2" rprintfdev="Display"><BATTERY builtin="true" mah="5000.0" name="Batt" voltage="9.0"/><BATTERY builtin="true" mah="0.0" name="Gnd" voltage="0.0"/><DEVICE builtin="true" device="hwuart" name="uart1"><PARAMETER key="uart" value="[type=hw;hwUart=1;baud=115200;rxBuf=0;txBuf=0]"/></DEVICE><DEVICE builtin="true" device="clock" name="clock"><PARAMETER key="Scheduler" value="0"/><PARAMETER key="Timer" value="TIMER5"/></DEVICE><DEVICE device="HD44780" name="Display"><PARAMETER key="numLines" value="4"/><PARAMETER key="e" value="A6"/><PARAMETER key="numPins" value="4"/><PARAMETER key="rs" value="A4"/><PARAMETER key="d5" value="E3"/><PARAMETER key="rw" value="A5"/><PARAMETER key="d4" value="E2"/><PARAMETER key="numCols" value="20"/><PARAMETER key="d7" value="E5"/><PARAMETER key="d6" value="E4"/><SUPPLY powerBus="5V" supplyid="2"/><SUPPLY powerBus="Gnd" supplyid="1"/></DEVICE><DEVICE device="gpsnmea" name="gps"><PARAMETER key="uart" value="[noTx=;baud=9600;hwUart=3;txBuf=0;type=hw;rxBuf=0]"/><SUPPLY powerBus="Gnd" supplyid="1"/></DEVICE><DEVICE device="droneCell" name="myDroneCell"><PARAMETER key="ring" value="A1"/><PARAMETER key="status" value="A3"/><PARAMETER key="uart" value="[baud=38400;hwUart=0;txBuf=48;type=hw;rxBuf=16]"/><PARAMETER key="smsbuf" value="140"/><PARAMETER key="sim" value="A2"/><PARAMETER key="reset" value="A0"/><PARAMETER key="smsc" value="+1 312 314 9810"/><PARAMETER key="debug" value="Display"/><PARAMETER key="debugIn" value="Display"/><SUPPLY powerBus="Batt" supplyid="2"/><SUPPLY powerBus="Gnd" supplyid="1"/></DEVICE><DEVICE device="hwuart" name="myUart"><PARAMETER key="uart" value="[baud=9600;hwUart=2;txBuf=24;type=hw;rxBuf=24]"/><SUPPLY powerBus="Gnd" supplyid="1"/></DEVICE><DEVICE device="spi" name="spiBus"><PARAMETER key="spiType" value="Hardware"/><PARAMETER key="master" value="true"/><DEVICE device="sdCard" name="sdCard"><PARAMETER key="select" value="A7"/><PARAMETER key="disk" value="false"/><PARAMETER key="powerReg" value="false"/><SUPPLY powerBus="3.3V" supplyid="2"/><SUPPLY powerBus="Gnd" supplyid="1"/></DEVICE></DEVICE><INCLUDES/></project>
« Last Edit: July 09, 2012, 09:11:05 AM by Lester »

 


Get Your Ad Here

data_list