Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

A few programming questions

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
10 postsPage 1 of 1
10 postsPage 1 of 1

A few programming questions

Post by Richard » Sun Jan 07, 2007 11:20 am

Post by Richard
Sun Jan 07, 2007 11:20 am

I have just started to look at getting the CMU cam to talk to RoboNova and a few questions have arrisen!

Debugging is a bit of a PITA without an LCD unit attached. Do they exisit yet?

Is MUSIC the only sound command that works? Is there any way to just make a sound at any pitch - like the SOUND command?

Is the ETX, ERX port TTL or true RS232? The manual seems to suggest it's TTL. I guess the ERX command only reads in one byte regardless of the variable type. Is there any way to poll it for data or does it just return 0 if there's no data?

Shame there's no WHILE loops or CASE statments and an even bigger shame it doesn't have a RTOS kernel to allow multi threading or even any rudimentary interrupt type processing...

It would be so much better if the controller was open source and reprogrammable...

Thanks for your help.
I have just started to look at getting the CMU cam to talk to RoboNova and a few questions have arrisen!

Debugging is a bit of a PITA without an LCD unit attached. Do they exisit yet?

Is MUSIC the only sound command that works? Is there any way to just make a sound at any pitch - like the SOUND command?

Is the ETX, ERX port TTL or true RS232? The manual seems to suggest it's TTL. I guess the ERX command only reads in one byte regardless of the variable type. Is there any way to poll it for data or does it just return 0 if there's no data?

Shame there's no WHILE loops or CASE statments and an even bigger shame it doesn't have a RTOS kernel to allow multi threading or even any rudimentary interrupt type processing...

It would be so much better if the controller was open source and reprogrammable...

Thanks for your help.
Richard
Robot Builder
Robot Builder
User avatar
Posts: 21
Joined: Mon Apr 10, 2006 1:00 am

Post by Richard » Sun Jan 07, 2007 11:26 am

Post by Richard
Sun Jan 07, 2007 11:26 am

Oh and another thing..... unsigned integers only? :roll:
Oh and another thing..... unsigned integers only? :roll:
Richard
Robot Builder
Robot Builder
User avatar
Posts: 21
Joined: Mon Apr 10, 2006 1:00 am

Post by Pev » Sun Jan 07, 2007 12:10 pm

Post by Pev
Sun Jan 07, 2007 12:10 pm

Richard,

I think I can help with a few of these:

The LCD is available from http://www.robonova.de for some reason they have it listed under sensors, probably a good idea to drop Robosavvy sales a mail as I am sure they could get them too. However the LCD port can be used with a TTL to RS232 level shifter and a PC. The port is a 4800, 8,1,none configuration and I have sucessfully used both hyperterm and realTerm as debugging tools.

Secondly, yes the ETX, ERX ports are TTL level not RS232 and yes I believe they do a single byte at a time.

Anyway hope this helps

Pev
Richard,

I think I can help with a few of these:

The LCD is available from http://www.robonova.de for some reason they have it listed under sensors, probably a good idea to drop Robosavvy sales a mail as I am sure they could get them too. However the LCD port can be used with a TTL to RS232 level shifter and a PC. The port is a 4800, 8,1,none configuration and I have sucessfully used both hyperterm and realTerm as debugging tools.

Secondly, yes the ETX, ERX ports are TTL level not RS232 and yes I believe they do a single byte at a time.

Anyway hope this helps

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by Pev » Sun Jan 07, 2007 12:17 pm

Post by Pev
Sun Jan 07, 2007 12:17 pm

Oh and this was the best I could come up with on the polling front:

'REM Wait for Bluetooth connection
Wait_33:
ERX 9600,RXC,Wait_33

IF RXC = 33 THEN
GOTO MAIN
ELSE
GOTO Wait_33
ENDIF

This one cycles looking for a value of 33. I think but I am not positive that if you do a read with no data it jumps to the routine defined as the 3rd argument of the ERX command.

Pev
Oh and this was the best I could come up with on the polling front:

'REM Wait for Bluetooth connection
Wait_33:
ERX 9600,RXC,Wait_33

IF RXC = 33 THEN
GOTO MAIN
ELSE
GOTO Wait_33
ENDIF

This one cycles looking for a value of 33. I think but I am not positive that if you do a read with no data it jumps to the routine defined as the 3rd argument of the ERX command.

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by TheGuru » Sun Jan 07, 2007 6:20 pm

Post by TheGuru
Sun Jan 07, 2007 6:20 pm

Pev,

I am really interested in your use of the LCD port for RS232 output, but do you know if the TTL is 3.3v or 5v? Also, does this need to interface to a true RS232 -12/+12 port or can it be used with a USB/RS232 adapter?
Pev,

I am really interested in your use of the LCD port for RS232 output, but do you know if the TTL is 3.3v or 5v? Also, does this need to interface to a true RS232 -12/+12 port or can it be used with a USB/RS232 adapter?
Never criticise a man until you've walked a mile in his shoes ... then you can say what you want cos he's a mile away and you have his shoes ;o)
TheGuru
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Sun Dec 17, 2006 1:00 am
Location: Coventry, UK

Post by i-Bot » Sun Jan 07, 2007 7:03 pm

Post by i-Bot
Sun Jan 07, 2007 7:03 pm

Interface is TTL 5V

Try the FTDI cable TTL-232R, available in different connector configs and fairly cheap.
Interface is TTL 5V

Try the FTDI cable TTL-232R, available in different connector configs and fairly cheap.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by TheGuru » Sun Jan 07, 2007 8:58 pm

Post by TheGuru
Sun Jan 07, 2007 8:58 pm

Thanks i-Bot,

I just ordered the cable. It will be nice to get some sensible feedback during RNs operation. :)
Thanks i-Bot,

I just ordered the cable. It will be nice to get some sensible feedback during RNs operation. :)
Never criticise a man until you've walked a mile in his shoes ... then you can say what you want cos he's a mile away and you have his shoes ;o)
TheGuru
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Sun Dec 17, 2006 1:00 am
Location: Coventry, UK

Post by Pev » Sun Jan 07, 2007 9:33 pm

Post by Pev
Sun Jan 07, 2007 9:33 pm

I use a TTL to RS232 converter based on a max232 chip then interface it via a usb to rs232 converter for my laptop.

As I-Bot has said TTL levels are 5v

Pev
I use a TTL to RS232 converter based on a max232 chip then interface it via a usb to rs232 converter for my laptop.

As I-Bot has said TTL levels are 5v

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by TheGuru » Fri Jan 12, 2007 11:20 pm

Post by TheGuru
Fri Jan 12, 2007 11:20 pm

Try the FTDI cable TTL-232R, available in different connector configs and fairly cheap


iBot, Thanks for the cable ref. I have received the cable now, but have no idea of the pinouts. I'm guessing red(+ve) and Black(Gnd) but how exactly did you wire yours to the LCD port?

Regards

Mark
Try the FTDI cable TTL-232R, available in different connector configs and fairly cheap


iBot, Thanks for the cable ref. I have received the cable now, but have no idea of the pinouts. I'm guessing red(+ve) and Black(Gnd) but how exactly did you wire yours to the LCD port?

Regards

Mark
Never criticise a man until you've walked a mile in his shoes ... then you can say what you want cos he's a mile away and you have his shoes ;o)
TheGuru
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Sun Dec 17, 2006 1:00 am
Location: Coventry, UK

Post by TheGuru » Sat Jan 13, 2007 1:13 am

Post by TheGuru
Sat Jan 13, 2007 1:13 am

Don't worry, I found the schematic on the FTDI site and picked out the RX pin on the yellow cable. :lol: It works a treat. Is there anyway to insert a CR or LF into the output?
Don't worry, I found the schematic on the FTDI site and picked out the RX pin on the yellow cable. :lol: It works a treat. Is there anyway to insert a CR or LF into the output?
Never criticise a man until you've walked a mile in his shoes ... then you can say what you want cos he's a mile away and you have his shoes ;o)
TheGuru
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Sun Dec 17, 2006 1:00 am
Location: Coventry, UK


10 postsPage 1 of 1
10 postsPage 1 of 1