electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time

poster

Please visit the chat
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Compile code for AVR Atmega48. Dredrum I need help.
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [12 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
emiz



Joined: May 16, 2018
Posts: 15
Location: germany
Audio files: 1

PostPosted: Wed Sep 05, 2018 7:07 pm    Post subject: Compile code for AVR Atmega48. Dredrum I need help.
Subject description: Dredrum builders here?
Reply with quote  Mark this post and the followings unread

Hi

i bought a unoffical dredrum pcb from ebay..

the assembly was no problem.

but now i don´t know how to compile the code. the buran electrix site is down
i emailed the owner and he said he couldnt give me support because its an unofficial pcb not from his production.

on the github there is only a archive with 3 files dredrum.c 8bitsinetable.h and a make file.

could anybody tell me how to get a hex file from this archive.
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 749
Location: Netherlands
Audio files: 23

PostPosted: Wed Sep 05, 2018 11:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

It would help a lot if you provide a link to the github you mention so one could have a look at the schematics and code.
With the little info you give there is nothing I can do for you.

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
emiz



Joined: May 16, 2018
Posts: 15
Location: germany
Audio files: 1

PostPosted: Thu Sep 06, 2018 6:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Grumble wrote:
It would help a lot if you provide a link to the github you mention so one could have a look at the schematics and code.
With the little info you give there is nothing I can do for you.



https://github.com/buranelectrix/dredrum

theres a avrisp 6 pole socket on the pcb
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 749
Location: Netherlands
Audio files: 23

PostPosted: Thu Sep 06, 2018 1:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

first you need a program which is free to download, called Atmel Studio.
download it HERE
then start a new project and use the code from the github, compile and upload to your board.
for uploading you can use a tool like the avrisp or use an arduino to flash, but you have to google the howto.

btw I’m not a dredrum builder, just an atmel enthousiast...

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
emiz



Joined: May 16, 2018
Posts: 15
Location: germany
Audio files: 1

PostPosted: Thu Sep 06, 2018 8:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Grumble wrote:
first you need a program which is free to download, called Atmel Studio.
download it HERE
then start a new project and use the code from the github, compile and upload to your board.
for uploading you can use a tool like the avrisp or use an arduino to flash, but you have to google the howto.

btw I’m not a dredrum builder, just an atmel enthousiast...


thanks for the info. my internet pc is still running on windows xp, atmel studio 7 is not supportet by winxp, so i downloaded atmel studio 6.2.
now i can´t find the "compile" function i tried "save as" but i found nothing to save or convert the project as .hex file.
can you tell me which format do you use to upload the code to avr?
i got a "deek-robot usb-tinyisp" stick.

Last edited by emiz on Thu Sep 06, 2018 8:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 749
Location: Netherlands
Audio files: 23

PostPosted: Fri Sep 07, 2018 1:53 am    Post subject: Reply with quote  Mark this post and the followings unread

Before compiling you have to do three things:
First change the line where it says:
#include "./8bit_q_sine.h" into: #include "8bit_q_sine.h" and copy 8bit_q_sine.h to the map where main.c is.

in the file 8bit_q_sine.h you have to change:
PROGMEM prog_char q_sine_table[] = { to PROGMEM const char q_sine_table[] = {
this is because prog_char is not used anymore.

There are two ways to compile and transfer the data, since I only have studio 7 I will upload some screenshots from this version, but I think they are quite similar.

Ok, once you have your project ready you can either click on Build >> Build Dredrum
Now the code is compiled, now click on the icon with the flash:
Posted Image, might have been reduced in size. Click Image to view fullscreen.
and a menu is opened:
Where you can set your processor, isp clock frequency etc.
If you read your device signature right you may proceed to clicking on Memories:
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Just click on Program and that is it.

Another way of compiling and flashing is to click on the play button:
Posted Image, might have been reduced in size. Click Image to view fullscreen.


compile.JPG
 Description:
 Filesize:  9.31 KB
 Viewed:  443 Time(s)

compile.JPG



play.JPG
 Description:
 Filesize:  12.5 KB
 Viewed:  443 Time(s)

play.JPG



flash.JPG
 Description:
 Filesize:  65.53 KB
 Viewed:  4 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

flash.JPG



Dredrum.hex
 Description:
This is the hex file from Dredrum_Gate

Download
 Filename:  Dredrum.hex
 Filesize:  7 KB
 Downloaded:  5 Time(s)


Dredrum.hex
 Description:
This is the hex file for Dredrum_trig

Download
 Filename:  Dredrum.hex
 Filesize:  6.88 KB
 Downloaded:  6 Time(s)


_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
emiz



Joined: May 16, 2018
Posts: 15
Location: germany
Audio files: 1

PostPosted: Fri Sep 07, 2018 10:47 am    Post subject: Reply with quote  Mark this post and the followings unread

Grumble wrote:
Before compiling you have to do three things:
First change the line where it says:
#include "./8bit_q_sine.h" into: #include "8bit_q_sine.h" and copy 8bit_q_sine.h to the map where main.c is.

in the file 8bit_q_sine.h you have to change:
PROGMEM prog_char q_sine_table[] = { to PROGMEM const char q_sine_table[] = {
this is because prog_char is not used anymore.

There are two ways to compile and transfer the data, since I only have studio 7 I will upload some screenshots from this version, but I think they are quite similar.

Ok, once you have your project ready you can either click on Build >> Build Dredrum
Now the code is compiled, now click on the icon with the flash:
Posted Image, might have been reduced in size. Click Image to view fullscreen.
and a menu is opened:
Where you can set your processor, isp clock frequency etc.
If you read your device signature right you may proceed to clicking on Memories:
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Just click on Program and that is it.

Another way of compiling and flashing is to click on the play button:
Posted Image, might have been reduced in size. Click Image to view fullscreen.


Thank you so much Very Happy
This is really helpfull
I´ll try it tonight with Atmel Studio 6.2, if it doesn´t work i have to download Atmel Studio 7 to my music pc who´s usually not online.
Thanks a lot
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 749
Location: Netherlands
Audio files: 23

PostPosted: Fri Sep 07, 2018 2:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

you could try to use one of the hex files I provided Cool
_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
emiz



Joined: May 16, 2018
Posts: 15
Location: germany
Audio files: 1

PostPosted: Fri Sep 07, 2018 6:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Grumble wrote:
you could try to use one of the hex files I provided Cool


yeah your hex file worked. i used a program called avrdudess 2.4

[img][/img]

i´ve tried it without setting the baud rate and bit clock.

the interface seems to work the leds light up when i push buttons
but the sound is very distortet it seems like it where totaly pitched down.
i think it must have something to do with the external oscillator.
dredrum uses a 20mhz quarz oscillator. do i have to set the baudrate or the fuse bits correspondending to this?

i have a very high very loud beep tone all the time on the output and the voice from the module is pretty quiet.
or is there a difference between atmega48 and atmega 48p? i have atmega 48 without p.


avrdudess.png
 Description:
 Filesize:  42.19 KB
 Viewed:  5 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

avrdudess.png


Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 749
Location: Netherlands
Audio files: 23

PostPosted: Sat Sep 08, 2018 2:34 am    Post subject: Reply with quote  Mark this post and the followings unread

I have compiled it using the settings for an atmega48 (without the p)
But I don't know the meaning of your fuse settings:
Posted Image, might have been reduced in size. Click Image to view fullscreen.
So I can't tell really, could you make a screenshot of the fuse for the clock generation?
You should choose something like "external full swing crystal" and uncheck the fuse for low.ckdiv8, but make sure you leave high.spien CHECKED!!

HERE you could look at the calculation for the fuse settings.


fuses48.JPG
 Description:
 Filesize:  12.55 KB
 Viewed:  310 Time(s)

fuses48.JPG



_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
emiz



Joined: May 16, 2018
Posts: 15
Location: germany
Audio files: 1

PostPosted: Sun Sep 09, 2018 2:07 am    Post subject: Reply with quote  Mark this post and the followings unread

Grumble wrote:
I have compiled it using the settings for an atmega48 (without the p)
But I don't know the meaning of your fuse settings:
Posted Image, might have been reduced in size. Click Image to view fullscreen.
So I can't tell really, could you make a screenshot of the fuse for the clock generation?
You should choose something like "external full swing crystal" and uncheck the fuse for low.ckdiv8, but make sure you leave high.spien CHECKED!!

HERE you could look at the calculation for the fuse settings.


yeahah Smile it finally works. thanks for your help . Very Happy

used the fuse calcutor tried some values for full swing oscillator and unchecked clock divide by 8 and disabled internal oscillator output.

HUGE THANKS
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 749
Location: Netherlands
Audio files: 23

PostPosted: Sun Sep 09, 2018 2:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

your’e wellcome Very Happy
_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [12 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use