Putting robotics at your service™

Free shipping on orders over $200

ACR32 Testprogramm

Print view Share :
Previous topicNext topic

Page 1 of 1 [ 8 posts ]

Rookie ( offline )
Posts: 24
Posted: 2011-04-19 05:20 
 Post subject: ACR32 Testprogramm
Hello,
back again here after some time...
The attached littele Testprogram has some quirks:
I cannot set the terminal baudrate to H115200, get a compiler error.
Max seems to be 57600, is this correct?
Here are the results of the test:
VS1 is not correct, the Voltage should be 8.30V, The servos work as expected:

Servos zeroed!

Moving servo: 0

VS1 (hex) is -> 3
VL (hex) is -> 1AA
VS2 (hex) is -> 6
VS1 voltage is: 0.05v
VL voltage is: 8.32v
VS2 voltage is: 0.11v

Moving servo: 1

VS1 (hex) is -> 3
VL (hex) is -> 1AA
VS2 (hex) is -> 6
VS1 voltage is: 0.05v
VL voltage is: 8.32v
VS2 voltage is: 0.11v


Where can I find a documentation for the embedded Assembler?
Kind regards, Fried


Attachment:
Test01.bas [1.45 KiB]
Downloaded 118 times
User avatar
Guru ( offline )
Posts: 4908
Posted: 2011-04-19 09:48 
 Post subject: Re: ACR32 Testprogramm
I believe Nathan (AcidTech) may need to answer about how the board is wired for those three inputs. I know that there is some form of voltage divider, but not 100% sure of the divisions... It does look like you are following the example in the manual except you fixed the issue that it returned the value to a byte which for example if the input was 12 volts would not fit into a byte. But I verified that your program returned the hservostat to a word which should work.

Yes HSerial can not do 115200 as the underlying H8 processor running at 20mhz does not have any good settings for that baud rate. The closest is 125000.

Kurt


User avatar
Expert ( offline )
Posts: 628
Posted: 2011-04-20 14:02 
 Post subject: Re: ACR32 Testprogramm
Yes, The best standard uart speed you can hit with ARC32 is 57.6kbps. You can do none standard speeds and since we are using the FTDI USB chip you can actually use them when talking to a PC. Those speeds are 125k,312.5k and 625k. Basically any rate from 20000000/(32*n) where n is 0 and up.

THe voltage dividers use 20k and 10k resistors to give a 1/3 divide, assuming my math is correct. But some of the first boards may only have had 10k and 10k giving a 1/2 divide. Based on your numbers though it looks like VS1 and VS2 are floating. Are you using the latest Studio release?

_________________
Basicmicro


Rookie ( offline )
Posts: 24
Posted: 2011-04-21 01:38 
 Post subject: Re: ACR32 Testprogramm
I'm using MBIde Ver. 2.0.0.9.
VS2 is floating, but VS1 is ~8.3V.
Is there a docu of the IDE itself? I want to use C as my main dev language, and for some task ASM.
Is it possible to build object libraries?


User avatar
Guru ( offline )
Posts: 4908
Posted: 2011-04-21 10:00 
 Post subject: Re: ACR32 Testprogramm
Again the Voltage input is a Basic Micro hardware or Software issue that Nathan probably need to resolve...
But it works on my Arc32 Phoenix:
I get the results:
Code:
VS1 (hex) is -> 14A
VL (hex) is -> 154
VS2 (hex) is -> 14A
VS1 voltage is: 6.44v
VL voltage is: 6.64v
VS2 voltage is: 6.44v

I am not saying that there is not issues here as my VL is a 9V, but again mine was one of the first boards and it probably has a 2 to 1 divider on VL...

Hint: the first time I ran this I got the results:
Code:
Moving servo: 0

VS1 (hex) is -> 6
VL (hex) is -> 152
VS2 (hex) is -> 8
VS1 voltage is: 0.11v
VL voltage is: 6.60v
VS2 voltage is: 0.15v

But that is when I remembered that I had not turned on the switch for servo power... :idea:

As for C code, there have been a few of us who have done it. I have built a version of the phoenix code in C. That is covered in a couple of different threads including: viewtopic.php?f=45&t=6677

The IDE does support C programming some. But is pretty primitive in it's support. No color coding, no project parameters, ... With my stuff I have been able to make libraries, but I had to do it outside of the IDE. That is Studio does download a complete version of the H8 GCC compiler and tools. I created a make file (used Microsoft's version of make) that allows me to create libraries. One version for BasicAtom Pro 28 (H8/3694) and one for BasicAtomPro40/Arc32 (H8/3687). To use the libraries I have to muck with the Linker files that Studio generates when you ask it to create a new C project.

Another user created another set of libraries for BAP28/BAP40 (Note: we have shared many of the ideas between the two code bases). You can read more about it in: viewtopic.php?f=4&t=6136. I do not believe his version of the code base uses libraries, but you need to add all of the source files that you use to the project...

The differences between these sets of libraries, was that he has added a lot more support for higher level devices and sensors, where I have spent more of my time at lower levels to try to support the underlying hardware and to give you some of the same support in C as you get in basic. Things like: HSERVO (works pretty well on Arc32, still needs more testing and work on others...), HSerial ...

I hope that helps.
Kurt


Rookie ( offline )
Posts: 24
Posted: 2011-04-21 15:24 
 Post subject: Re: ACR32 Testprogramm
Thanks very much Kurt,
I think my board has a hardware problem. I have now 3 batteries connected to VS1, VL and VS2.
VL & VS2 read ok, while VS1 does not. But VS1 & VS2 are there, the servos are moving correctly.
BTW I think if one makes heavy use of the 32 servos, the terminals might be a little on the smallish side
for the necessary amperage.
Kind regards, Fried


User avatar
Guru ( offline )
Posts: 9258
Posted: 2011-04-21 16:05 
 Post subject: Re: ACR32 Testprogramm
The SSC-32 has been used with all servo channels occupied. The power connectors are rated for 15 amps, so the SSC-32 can handle 30 amps of servo power. Assuming you have 18gage wire making the connections.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Expert ( offline )
Posts: 628
Posted: 2011-04-22 19:01 
 Post subject: Re: ACR32 Testprogramm
He's talking about the ARC-32, but since the ARC-32 terminals are slightly larger than the SSC-32 terminals he should be fine.

_________________
Basicmicro


 

All times are UTC - 5 hours [ DST ]. It is currently 2014-09-30 13:52
Feedback Form
Feedback Form