RC India

RC Models => Self-designed, DIY and College Projects => Topic started by: Voice of deaf on April 18, 2016, 04:32:22 PM



Title: burning bootloader to atmega8
Post by: Voice of deaf on April 18, 2016, 04:32:22 PM
hi everyone i have 2 atmega 8 mcu.
I want to burn arduino bootloader into it . But the problem is i dont have any usb to ttl/ftdi adapter or any arduino or any serial port i my pc . So how can i burn arduino bootloader in them ?


Title: Re: burning bootloader to atmega8
Post by: Darshan for multirotors on April 18, 2016, 05:14:47 PM
You can use usbasp for burning bootloader. Go to arduino ide and in the tools section click burn bootloader.
It should do the job
Every PC has a serial port...


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on April 18, 2016, 05:30:12 PM
i dont have a usbasp


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on April 18, 2016, 05:34:30 PM
i have serial port but my tv monitor is plugged into that port


Title: Re:
Post by: a3ruz on April 18, 2016, 05:37:42 PM
What ?


Title: Re: burning bootloader to atmega8
Post by: Balakrishna Reddy on April 18, 2016, 06:00:26 PM
What else do you have other than atmega8. Do you have any other arduino board or usbasp, serial port(com port 9 pin).


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on April 18, 2016, 06:07:28 PM
sir i dont have a usbasp and i have 2 serial ports on my pc . One is male and one is female . The female is connected to vga monitor and other port is free .


Title: Re: burning bootloader to atmega8
Post by: Darshan for multirotors on April 18, 2016, 06:09:18 PM
If you connect a device to the PC through the usb port, the PC gives it a serial port. Usbasp doesn't have a port.


Title: Re: burning bootloader to atmega8
Post by: Darshan for multirotors on April 18, 2016, 06:10:17 PM
You are not understanding the meaning of serial port...


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on April 18, 2016, 06:15:06 PM
so i dont have usbasp nor a arduino etc. I just have a pc and 2 types of atmega8l 1is dip and 1 is smd


Title: Re: burning bootloader to atmega8
Post by: Darshan for multirotors on April 18, 2016, 06:21:15 PM
You will need to buy a usbasp for burning bootloader... What purpose is the board serving?


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on April 18, 2016, 06:40:53 PM
robu.in/product-category/development-board/programmer/
which should i buy ?
Well that chip will be used for making a brushed esc


Title: Re: burning bootloader to atmega8
Post by: Darshan for multirotors on April 18, 2016, 06:43:49 PM
This is usbasp
http://robu.in/product/usbasp-avr-programming-device-for-atmel-proccessors/


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on April 18, 2016, 06:45:30 PM
www.robu.in/product/usbasp-avr-programming-device-for-atmel-proccessors
how is this ?


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 13, 2016, 12:23:39 PM
There are two ways,

Either you can use an Arduino board, then burn the "Arduino As ISP" sketch, then use the board to programme the Atmega8
Or, you can use usbasp to burn the bootloader into the Atmega8.
Arduino Pro-mini boards are pretty cheap ,so are the UsbAsp devies. Check ebay for low price.
Regards,
Dipanjan


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 13, 2016, 12:26:15 PM
www.robu.in/product/usbasp-avr-programming-device-for-atmel-proccessors
how is this ?
This is perfectly fine. You can buy it. Also buy some female to male headers with wires. it would be much easier to interface with the IC.


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 13, 2016, 01:32:36 PM
Got it.
Btw i am not able to burn any thing into that atmega8L . I think my fuses are locked.


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 13, 2016, 01:52:03 PM
what IDE are you using? Arduino? What errors are you getting?


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 13, 2016, 01:54:16 PM
fuses aren't locked by default. You can get them locked if you modified the boards.txt file


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 13, 2016, 02:59:00 PM
Okay got it.
Thanks
but if i know that the fuses are locked as the mcu is second hand , i bought a failed project of water level indicator and i retrieved the atmega 8L dip version.
I plan to use it to read analog inputs , and some pwm inputs and use them to generate a 12 channel  ppm stream .
So the above could be used to make a simple  transmitter .
What i want to include in tx are
10 channels variable
1 channel 6 position switch
1 channel 3 position switch
port for head tracking inputs
programming in arduino language
independent channel mapping.
Buzzer
DIGITAL TRIMS only on throttle
wireless programming
NO LCD DISPLAY


i wish to know that all these be possible ?
And could this be done in arduino ide language ?
  thanks


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 13, 2016, 04:09:36 PM
Atmega8 has 6 analog inputs. So you can implement 6 Potentiometers/multiple position switches at max.
If you want more analog inputs, you can opt for Arduino Mega board.

So basically you need to read the analog values from the pots/switches, turn them into a ppm stream, and send it via RF module. Yes it is possible from the Arduino IDE.

For the Atmega8 you have, what error is it exactly showing? from my personal experience, I can tell you that most of the time failing to burn programme, occurs from wrong circuit/ Oscillator problem. If you are wiling to use that Atmega8, It would be much more helpful if you post the schematic diagram and the picture of the setup.

Am making one DIY transmitter too. Hope to make it soon.

Regards,
Dipanjan


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 13, 2016, 05:22:57 PM
First thanks dipanjan sir
are you on opentx fw ?
For 12ch i plan to use 6 pots on analogue in and 6 with the help of flip flop pwm conversion.
The flip flop will read analog value and convert into pwm . So the pwm will be feed into digital inputs of the atmega .
Am i right ?


Title: Re: burning bootloader to atmega8
Post by: prabal276 on May 13, 2016, 08:11:45 PM
@ tanmay;
Ill be the first to buy your radio if sucessful. :)
Best of luck ;)


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 14, 2016, 11:58:46 AM
Sure prabal
The second piece will be yours.
Will have open source hardware and software designs.
Target price  without module -  1400 rs


Title: Re: burning bootloader to atmega8
Post by: prabal276 on May 14, 2016, 12:07:28 PM
hmm...
Good ;)


Title: Re: burning bootloader to atmega8
Post by: fxshoppe on May 16, 2016, 07:00:37 AM
Would love to help you with the project but frankly atmega8 is to small for this project. Use a nano it will solve your programming issue also. Do you have a parallel port in your cPU 25 pins 13 and 12 ( female)
BTW the female serial port you are referring is VGA port as it has 15 pins in 3 rows correct?
In case if you have a short requirement for programmer i can loan for 10 -12 days. I will pay shipping to jodhpur, u pay for the return post.Else u can buy one for around 200 good to have for future.


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 16, 2016, 11:32:34 PM
Well thanks a lot for the nice word frame.
I have bought a usbasp. But i have no success with it.
I couldnt even burn a blink program in the atmega 8l.
Either the pc or the usbasp is wrong configured.


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 16, 2016, 11:34:30 PM
I am currently curius that how flip flop could be range caliberated ?


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 17, 2016, 12:06:54 AM
you should post the error you are getting at the Arduino IDE. What does the error say?
And I really don't understand what you are going to do with flip flops. You can generate PWM signal using 555IC and a potentiometer, but I dont understand how are you going to use flip flop


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 17, 2016, 01:45:21 PM
i thought that using flip flops between the radio input pots and the analog input will increase stick reading resolution and that is already done in hitec radios
although i could skip these .
okay  inm in the process of finding the root of the error in the arduino ide
i shall report in few minutes


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 17, 2016, 01:46:22 PM
also i have selected aruino NG and atmega8L as the mcu


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 18, 2016, 04:43:14 PM
java.io.IOException: Access is denied
   at java.io.WinNTFileSystem.createFileExclusively(Native Method)
   at java.io.File.createTempFile(File.java:2024)
   at processing.app.BaseNoGui.saveFile(BaseNoGui.java:1087)
   at processing.app.SketchCode.save(SketchCode.java:222)
   at processing.app.SketchData.save(SketchData.java:165)
   at processing.app.Sketch.save(Sketch.java:595)
   at processing.app.Editor.handleSave2(Editor.java:2244)
   at processing.app.Editor.handleSave(Editor.java:2224)
   at processing.app.Editor.handleExport(Editor.java:2356)
   at processing.app.Editor$18.actionPerformed(Editor.java:725)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
   at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
   at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
   at java.awt.Component.processMouseEvent(Component.java:6535)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
   at java.awt.Component.processEvent(Component.java:6300)
   at java.awt.Container.processEvent(Container.java:2236)
   at java.awt.Component.dispatchEventImpl(Component.java:4891)
   at java.awt.Container.dispatchEventImpl(Container.java:2294)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
   at java.awt.Container.dispatchEventImpl(Container.java:2280)
   at java.awt.Window.dispatchEventImpl(Window.java:2750)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.awt.EventQueue$4.run(EventQueue.java:729)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Access is denied
Build options changed, rebuilding all
In file included from C:\Users\mm\Desktop\ttnmnfk\download\arduino-1.6.8\hardware\arduino\avr\cores\arduino\wiring_private.h:31:0,

                 from C:\Users\mm\Desktop\ttnmnfk\download\arduino-1.6.8\hardware\arduino\avr\cores\arduino\wiring_digital.c:26:

C:\Users\mm\Desktop\ttnmnfk\download\arduino-1.6.8\hardware\arduino\avr\cores\arduino\Arduino.h:187:0: warning: "PE" redefined [enabled by default]

 #define PE 5

 ^

In file included from c:\users\mm\desktop\ttnmnfk\download\arduino-1.6.8\hardware\tools\avr\avr\include\avr\io.h:350:0,

                 from C:\Users\mm\Desktop\ttnmnfk\download\arduino-1.6.8\hardware\arduino\avr\cores\arduino\wiring_private.h:26,

                 from C:\Users\mm\Desktop\ttnmnfk\download\arduino-1.6.8\hardware\arduino\avr\cores\arduino\wiring_digital.c:26:

c:\users\mm\desktop\ttnmnfk\download\arduino-1.6.8\hardware\tools\avr\avr\include\avr\iom8.h:534:0: note: this is the location of the previous definition

 #define PE 2

 ^


Sketch uses 866 bytes (12%) of program storage space. Maximum is 7,168 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 1,015 bytes for local variables. Maximum is 1,024 bytes.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

its the error


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 18, 2016, 04:43:57 PM
when i tried to upload the blink
all obve happened


Title: Re: burning bootloader to atmega8
Post by: Balakrishna Reddy on May 18, 2016, 05:02:24 PM
Try them with previous Versions of Arduino ide .
Do you have any other Arduino boards?
I did not have any success with usbasp and Arduino.
I recommend to have a Arduino board


Title: Re:
Post by: a3ruz on May 19, 2016, 05:30:12 PM
Make sure that your MCU is preloaded with bootloader before uploading blink


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 19, 2016, 10:54:13 PM
1. Double-triple check the connections.
2. Have you correctly put external crystal in to breadboard with 22pF caps?
3. Have you selected the right board from the Arduino IDE? It should be Arduino NG or Older, or something else with atmega8 in it @16MHz.
4. Please post pics of your setup if everything else fails.

This kind of error is pretty common (to me at least). I have always faced this, then also solved it either by correcting the circuit, or by making some changes in the boards.txt file.


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 19, 2016, 10:59:18 PM
Try them with previous Versions of Arduino ide .
Do you have any other Arduino boards?
I did not have any success with usbasp and Arduino.
I recommend to have a Arduino board

Uspasp is pretty easy to use once you figure out the connections. I made a ISP header from female jumpers, it makes life a lot easier as you don't have to figure out the connections each and every time.

Oh,I forgot to mention, I use Windows 7 Operating system. In Linux ,there are some special commands to be executed(which I couldn't figure out) before usbasp gets access to the USB port of your computer. It wont work straight out of the box.


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 20, 2016, 12:52:56 PM
The wiring is correct.
The circuit is correct.
The selected board is correct.
But i need help in what to do in boards.txt  ?


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 20, 2016, 12:55:58 PM
Also have tried khazama to burn optiboot into atmega8l.
No success.

Would like to mention that there are 2 led on usbasp . One (red) always lit.
The other (orange) never lights up .
Why ?


Title: Re: burning bootloader to atmega8
Post by: Balakrishna Reddy on May 20, 2016, 01:49:02 PM
Red led indicates power supply to usbasp where as other led is connected to clock line.
So whenever usbasp is trying to communicate with slave MCU it has to light up or else there might be some problem. Once check for continuity b/w atmega8 pins in usbasp to the programming header and also the led. schematic is found on web which is open source.


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 20, 2016, 02:28:06 PM
Already checked the wiring to mcu . I think the fuses are locked.


Title: Re: burning bootloader to atmega8
Post by: Balakrishna Reddy on May 20, 2016, 03:55:21 PM
Have you tried other softwares such as progisp. If still problem persist try with a new MCU. It would be more easy if you have serial port db9.


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 20, 2016, 03:57:56 PM
The error says there is something error with Java in your PC. Have a look at that. Do you have some other PC? Try there.
Also I guess you have selected usbasp from the programmer menu in the Arduino IDE, right?


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 20, 2016, 04:06:43 PM
Right
i also have installed the www.fischl.de driver for usbasp.
Prime time to give up and pick a arduino uno


Title: Re: burning bootloader to atmega8
Post by: Dipanjan on May 20, 2016, 04:10:27 PM
Right
i also have installed the www.fischl.de driver for usbasp.
Prime time to give up and pick a arduino uno
Best of luck buddy, keep us updated about your progress.
I am not getting much time to progress making the Tx. Will do soon.


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 20, 2016, 04:20:31 PM
Well thanks all for helping me.
I think it would be convinient to use arduino boards and ide to work , as i dont have programming experience.
If i succeeded in making the tx , i would post in detail.
Thanks


Title: Re: burning bootloader to atmega8
Post by: Balakrishna Reddy on May 20, 2016, 09:08:03 PM
There is a software known as xloader using which you can compile your own program in atmel studio or any .hex file and flash them on to arduino boards without actually erasing bootloader on them. So you can use your arduino board with atmel studio and also with arduino ide. But before that make sure that you buy atmega328p in spare and burn arduino bootloader as safety.
And you can even burn bootloaders with ease using arduino board rather than usbasp.


Title: Re: burning bootloader to atmega8
Post by: Voice of deaf on May 20, 2016, 09:31:02 PM
Okay thanks sir
currently i dont own any
but now i think i shall  buy some arduino boards