...
...
Hi...
I seem to be having trouble programming the EEPROM...
The HEX is OK, no problems there... I can compile and build using WinAVR...
I also tried a small program to blink the Error LED and that worked ok...
But... when I try to write the EEPROM, I get this message from WinAVR...
I'm using an ATMega8-16AU chip with the code from "Servo_AtMega_CompInt " ...Entering programming mode.. OK!
Programming EEPROM .. OK!
Reading EEPROM .. OK!
WARNING: EEPROM address 0x0010 is 0xFF (should be 0x2C).. FAILED!
Leaving programming mode.. OK!
I connected with the UART and got nothing so it confirms the EEP isn't programming correctly...
Any suggestions??
Thanks,
Michael
Moraru what Your results?
Krazatchu - You may translate in .pdf format or graphic (.jpeg, .gif ….)? Laziness Eagle to install.
Try when programming to disable "Verify". I her disable.
Unless mistaken under Verify EEPROM with AtMega8 with CodeVisionProgrammer beside me too what that problems were. After disable Verify - all were orderly. But I can mistaken, so this was long ago.
When read given in EEPROM in Programmer they are read wrong though in ServoTuning read all orderly.
Possible on this as that affects subroutine EEPROM_RAM_Majorization:
For of capacity to work of the servocontroller on AtMega 8 code Servo_AtMega_TimerInt load from archive in message №1 http://www.cnczone.com/forums/attach...0&d=1228992071 .
This code I tested - all O'k.
Then if all will earn, that possible load code Servo_AtMega_CompInt His I did not test, but guarantee on 95% that will work.
For check of capacity to work servocontroller possible not to load files .eep (under programmer). Afterwards PID adjustment to carry in ServoTuning and there their save (button "Save" in EEPROM).
If I have time, that I try to add change from Servo_AtMega88_CompInt_Modif for AtMega8. You afterwards check capacity to work. This will be a general project.
In private message i asked about code for AtMega48. Here is he. I his did not test.
Hi
arisov,
I by pas optocouplers and servo work great. I test with Mach3, TurboCNC and Kcam and all is OK, works very fain. I intend to build a breakout board with optocouplers for to link PC to servo. In this weak I intend to command a big motor, 140v DC, 7.1A. For moment I'm satisfied how work servo. I wait for you new servo variant. Until now you work great and I appreciate very much, and I think not only me.
Tanks a lot.
Moraru.
Hi arisov,
All works very gut.
Tanks a lot. Keeping touch.
Moraru.
Sorry because may messages appears twice ,first shut down net and I try again.
Moraru
For AtMega88 possible to try more fast version code AtMega88_3_3 (in contrast with Servo_AtMega88_CompInt_Modif).
In code Servo_AtMega88_CompInt_Modif I have used programme Suppression Noise (filter) for Encoder (subroutine ANA_COMP), which limits speed servocontroller. Version code Servo_AtMega88_CompInt_Modif for the best suits for encoder with maximum frequency 20-30кГц (theoretically).
For more high frequency better to use AtMega88_3_3.
Moraru, if You will not obstruct - check (test) her please. Only do not forget to save (on sheet of paper) their own PID adjustment to afterwards their once again not to select.
I just tried the Servo_AtMega_TimerInt and I got the same error...
I also tried connecting it to the serial port @ 38400 ...Entering programming mode.. OK!
Programming EEPROM .. OK!
Reading EEPROM .. OK!
WARNING: EEPROM address 0x0010 is 0xFF (should be 0x2C).. FAILED!
Leaving programming mode.. OK!
When I turn on the board, all I get form the terminal is "<0>" ...
There is no message like in the ASM file "SERVO V3.0 Meg8" ...
So it seems the eeprom isn't being programmed....
Any more suggestions ??
Allright...
I just tried it with a mega8-16pu (DIP type) on a protoboard ...
I got the same error as before.... but....
Now the servo tuning program connects...
And using a terminal I get the message "SERVO V3.0 Meg8"....
But it still isn't working on the PCB I made...
Which is strange since I tested the chip with some C code to blink the error light...
Maybe the xtal is off or bad...
Problem solved....
I tested with a DIP type Mega 8 on a protoboard and got the same error...
But this time the serial connection worked, the terminal gave the message "SERVO V3.0 Meg8"
The tuning program also connects now...
Seems I didn't solder down the TX pin... And because I put a couple of vias under the chip it was held up a little...
Thanks!!
Tanks arisov, I download files and will try today afternoon.
Moraru.
arisov,
I have a question, its possible to drive a stepper motors in loop back mode with servo (with same modification of course)?
Tanks.
Moraru.
Yes it is possible... It's called "closed loop stepper"...
Michael
Tanks Michael, I know this method of control. I want to know if this servo (Arisov servo with same modification) work with stepper motor, in loop back control mode.
I think the stepper control uses a different kind of PID, but I'm not sure...
I read somewhere that closed loop steppers don't require tuning...
Here is a pic of the populated board...
The FETs are homemade to-263 ... They were to-220 before
I cut the tops off them, but I will make a new package so that cutting isn't required...
I went to the market today with a list of about 50 to-263 fets but couldn't find any of them...
I decided to use the irf540 (to-220) instead....
I will also change the diodes on the output to to-263...
The current ones are only good for 3A @ 100v....
I just got some to-263 style diode that will take 20A @ 100v...
And I will add some holes for mounting a heatsink...
Thanks!
Michael
Could i use ATmega48 chip ?
http://www.datasheetcatalog.org/data...tmel/2545S.pdf
I made PCB like is drown here. I program my atmega88 -20PU chip with code Atmega8 -L298 with dead time.
I think it doesnt work.
Well, i have on my DC servo motors digital incremental encoder AMT-102, so i do not need any pull up resistors.
Wich code can i use to program my chip? I don't wont to build PCB with analog comparators .
Would original code work?
It would be good idea to add current controll code into Atmega8+L298 file
arisov,
After many many......... many attempts and failures,
I have a first success with a motor, 150v and 3,3A:banana: :cheers:
As soon as possible I will post a video.
Tanks again.
Moraru.