I’m a robot fan,I’ve downloaded the SSC-32 servo control software “32v103.zip”,but I don’t compile it accurately,I want to know why? And why include the “mega16.h” in the appdef.h header file? When I shield the “include mega16.h”,the massage show RAM overflow! Would you like to tell me! Thanks!
Hello lionlike,
I have inquired about compiling the firmware to Lynxmotion and they forwarded me to their developer Mike. He provided me the following information:
"I built the SSC-32 application using CodeVisionAVR version 1.24.1e Standard. Go to (Project->Configure->C Compiler) and make the following settings:
Chip: ATmega8
Clock: 14.745600 MHz
Memory Model: Small
Optimize for: Size
Program Type: Application
(s)printf features: int
(s)scanf features: int, width
SRAM
Data Stack size: 32 bytes
Heap size: 0 bytes
Internal SRAM size: 1024 bytes
External SRAM size: 0 bytes
Code Generation
Bit Variables size: 0
The following are checked:
char is unsigned
8 bit enums
Enhanced core instructions
Automatic Register Allocation
Enable Warnings
The following are NOT checked:
Promote char to int
Stack End Markers
File Output Format(s): COF ROM HEX EEP
There are some global variables that need to be in certain locations in the memory map. Specifically, the serial transmit and receive buffers, and the register variables. I think the location requirements are fairly well documented in the comments, but I recommend that you not mess with the locations of these variables.
Regarding the servo refresh rate, it is set for the standard 50 Hz right now. It could be changed, but that would just move the buzzing to a different frequency. To change it, adjust the edge_array initilization for the last 4 elements. The edge interrupts must be no more than 4444 microseconds apart, or they will overflow the counter. During the main loop, the servo pulses are output for 10 ms (in the background by the timer ISR), and then the processor has 10 ms off to catch up on serial commands and hexapod sequencing. If you reduce this by too much, the board might not be able to keep up with continuous commands at the max Baud rate. I have not tested with any refresh rate besides 50 Hz."
David Garske
wibotics, Inc.
wibotics.com