Henne's DMX transce...
 
Notifications
Clear all

Henne's DMX transceiver code

14 Posts
6 Users
0 Reactions
9,558 Views
Posts: 6
Topic starter
(@mactommy)
Active Member
Joined: 18 years ago
[#6869]

Is there anyone that have assembly or c code for Henne's DMX tranciver card so I could made own DMX-stuff with the same card. I try to check the HEX-code but I gave up. If I could see a pattern between all hex-file it should be easier to understand all the hex code, but ther isn´t... 🙁

I need to make a stepper motor that run forwards/backwards with a speed channel. We are going to bulid a DMX analouge clock so we can run minute hand by DMX. We mount a small stepper direct into our clockwork axle so we just need one stepper to run our clock... But we don´t want it to be finite for x laps because we don´t know the clock transmission for 1 hour with our stepper. It´s better to change the speed from the lighting consoles. 🙂

Stepper 1
#1 - 0% forward
100% backwards
#2 - 8-bit Speed
Stepper 2
#3 - 0% forward
100% backwards
#4 - 8-bit Speed

Best regards
Tommy


13 Replies
Posts: 12
 Murl
(@murl)
Active Member
Joined: 19 years ago

Henne's website gives some code examples in C for transmitting and receiving DMX here. I've been playing around with them lately, and they're pretty well documented.

-hope this helps. 🙂


Reply
Posts: 6
Topic starter
(@mactommy)
Active Member
Joined: 18 years ago

I read the document but don´t really understand how I can run a stepper with this instruction.

#define DMX_FIELD 0x60 //base address of DMX array
#define DMX_CHANNELS 2 //no. of channels
#define F_OSC 8000 //oscillator freq. in kHz (typical 8MHz or 16MHz)
#define USE_DIP //should get start address from DIPs?

I usaly code C# and VB6 and if a got a more code example for example LED or stepper it´s more easaly to understand and code without reading a lots of C tutorials on net and try code without nowing what I'm doing..

I undestand that #define is for declare a string or constant or something like #define PI 3.14159 and use PI instead of value 3.14159...


Reply
Posts: 12
 Murl
(@murl)
Active Member
Joined: 19 years ago

That part of the .PDF is just letting you know which variables you need to define in the header file for his examples to work.

Right next to where you downloaded the pdf file is a picture of a CD. If you click on the CD, you'll be able to download a .zip file with DMX examples in both C and assembly.

They won't help you with the stepper motor portion of your project, but they'll show you a working example for the DMX portion.


Reply
RPM
Posts: 1080
 RPM
(@rpm)
Noble Member
Joined: 19 years ago

If you need some reference material for assembly language on the AVR, this site has some excellent material:

http://www.avr-asm-tutorial.net/avr_en/index.html

This is a tutorial from that site that can be downloaded at
http://www.avr-asm-download.de/beginner_en.pdf

Robert


Reply
Posts: 6
Topic starter
(@mactommy)
Active Member
Joined: 18 years ago

Great... thanks both RPM and Murl... I saw the "CD" on Hennes webpage and thought it´s the same document as the PDF in other format, thats way I dont´t try to download it. Shame on me... 🙂

Is there anyone who can explain how a stepper is working and in wich order the power is set to the stepper? Is there anything else that I should know about steppers before I start building my first project on Hennes DMX-card and steppers?


Reply
kostyun
Posts: 2178
Guest
(@kostyun)
Member
Joined: 20 years ago

You have looked at his stepper motor firmware / setup on his site right?

http://www.hoelscher-hi.de/hendrik/english/stepper.htm


Reply
Posts: 6
Topic starter
(@mactommy)
Active Member
Joined: 18 years ago

Yes, I have read all about the stepper and also try the software. In Hennes stepper software I must told my stepper to go number of laps on a 8-bit DMX number. So if I choose eight laps it´s calculated 256 steps to rotate all laps... 40 laps it's also 256 steps. I could use 16bit, but it dosen´t go far enough.

When we try a stepper on our watch we get 40 laps for 2.5h with our clockwork. When we start our application the stepper starts rotate at least 40 laps to calibrate position. I don't need that and want it to run like an ordernary DC motor.

Now we use RC-servo software with a RC speed regulator for 12V DC motor. But I hope anyway to solve this with a stepper in future if I could found out how I power my stepper with AVR-prossecor. I have a few more ideas what we can do with a stepper.


Reply
Posts: 22
(@henne)
Eminent Member
Joined: 18 years ago

Hi,

let me say first:
Each firmware has it's own sources.
So you can't drive steppers with the DMX reception library (which is quite obvious btw...)

The stepper firmware is written in C and there is a german thread on dmxcontrol.de where I describe how to position steppers with DMX. (No, I won't translate it 😉
http://dmxcontrol.de/wbb2/thread.php?threadid=2240

To the 40 rotations: I think, the range is too big and so there might be an overflow. (I tested once 5 or 8 rotations...)

best regards,
hendrik

PS: I don't have the time to expand the range. For constant rotation I wrote a tutorial based on dc-Motors on dmxcontrol.de:
http://dmxcontrol.de/wbb2/thread.php?threadid=2237


Reply
Posts: 6
Topic starter
(@mactommy)
Active Member
Joined: 18 years ago

Hi Henne,

Why should you transalte when we have Google translation... it´s an ugly translation, but I understand the text. 😀

The thing is that I want a steppermotor running like a DC-motor. So I don´t wan´t to set laps, just be able to change the speed from very slow to "fast" within an 8-BIT DMX channel. And maybe have a second DMX-channel to change direction. So I want´t to make it much easier (I think) to just rotate the stepper in diffrent speeds, instead of position the stepper.

Best regards
Tommy


Reply
Page 1 / 2
Share: