Jump to content

clockbox / programmation


matoz
 Share

Recommended Posts

Salut à tous, je viens de finir une clockbox, et comme je n' y comprend pas grand chose à la programmation  :-\ , je fais appel à vous car je voudrais faire une petite modif:

En fait, j' aimerais réduire le nombre de mesures de 256 à 16, je pense que c' est tout à fait possible, mais je ne connais pas du tout la marche à suivre pour modifier clockboxV1.0  ou V1.1....

Voilà, merci

Link to comment
Share on other sites

Bonjour à tous, je reviens vers vous, car j' ai épeluché tous les fichiers qui sont dans Clockbox V1.0 et V1.1 et je ne vois pas d' endroit ou il faut modifier le programme pour réduire le nombre de mesures à 16  :-\  . D' après ce que j' ai compris, il faut modifier le fichier .asm mais je ne trouve aucune ligne qui mentionne le nombre de mesures...

Y' a t il un programmeur qui pourrait me renseigner et m' expliquer la marche à suivre parce que là je ne sais plus quoi faire.... ça doit être tout con à faire, et ça doit être devant mes yeux...

Link to comment
Share on other sites

ok,

je pense qu'il te faut ajouter quelque chose comme ça dans mclock.c  :

#endif

      if( ++mclock_ctr_beats == 4 ) {

mclock_ctr_beats = 0;

++mclock_ctr_measures;}

/////////////////////////////////////////////////////////////////

if( mclock_ctr_measures == 16 ) {

mclock_ctr_measures = 0; }

//////////////////////////////////////////////////////////////

sous reserve..

Link to comment
Share on other sites

  • 1 month later...

Merci pour ta réponse mais je ne vois pas vraiement ou je doit insérer cela... n' importe où?  ???

Et je pensais, il doit bien y avoir un endroit où il est écrit "if mesure = 256 then recommence à 0...."  el je pensais juste remplacer 256 par 16...

Link to comment
Share on other sites

salut,

à priori,  "mclock_ctr_measures" ne revient pas à zero à 255, bien qu'il s'agisse d'un char:

unsigned char mclock_ctr_measures; // counts the measures (up to 65535)

pourquoi, comment ?  ??? si il y a quelqu'un qui sait...

sinon:

dans le fichier mclock.c, ligne 178, tu peux voir:

      if( ++mclock_ctr_beats == 4 ) {
	mclock_ctr_beats = 0;
	++mclock_ctr_measures;
      }
je ne suis pas trop sûr de moi, mais ça devrait marchait en ajoutant le code juste aprés (en restant dans le même "if" ):
      if( ++mclock_ctr_beats == 4 ) { mclock_ctr_beats = 0;   if( ++mclock_ctr_measures == 16 ) {               mclock_ctr_measures = 0; }       }
teste comme ça, si ça marche pas (problême de syntaxe ou de priorité, va savoir, mais à priori y'a pas de raison  ::) ) , décompose le truc :
      if( ++mclock_ctr_beats == 4 ) {
	mclock_ctr_beats = 0;
 	++mclock_ctr_measures == 16;

      if( mclock_ctr_measures == 16 ) {
              mclock_ctr_measures = 0; }
      }

c'est moins joli, mais surement le compilateur rendra la même chose en sortie..

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

I'am French but I can read and write english. If you're French, you can aslo answer me in French :-D

I am trying to solve MATOZ25's problem (clockbox count to 16 instead of 256) I've install on my PC GPUTILS, Perl and SDCC. I've also set my PATH parameters !

Before trying to change the code, I've just tying to compile the current code, in order to check if my computer is correctly installed. At the end of this post is the result of the DOS windows when I run "make.bat" file. I've got a HEX and SYX file, but I obtain a hight number of "warning", so I want to known if I make something wrong :

I compare the original .hex file and the .hex file I've obtain with a hexadecimal editor and I found differences :-/

Thanks

--

Bonjour,

Je suis en train d'essayer de résoudre le problème de MATOZ25 (arrêter le comptage à 16 au lieu de 256)

J'ai installé l'ensemble des outils nécessaires comme indiqué sur votre site. Avant de tenter de modifier le code, j'essaye déjà de recompiler le code existant pour vérifier si mon PC est correctement configurer.

Apparament ça marche (j'obtiens des fichiers .HEX et .SYX) mais j'ai pas mal de warning; pouvez-vous jeter un oeuil ?

Avec un éditeur hexadécimal j'ai comparé le fichier .hex original et celui que j'ai généré et il y a des différences :-/

Merci

--

Microsoft Windows XP [version 5.1.2600]

C:\Documents and Settings\RLUCAS>cd d:\_matoz25\clockbox_v1_1\

C:\Documents and Settings\RLUCAS>d:

D:\_matoz25\clockbox_v1_1>make.bat

Makefile generated.

Makefile.bat generated.

Assembling MIOS SDCC wrapper

==========================================================================

Compiling mclock.c

at 1: warning 117: unknown compiler option '--fstack' ignored

==========================================================================

Compiling pic18f452.c

at 1: warning 117: unknown compiler option '--fstack' ignored

_output\pic18f452.asm:168:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:171:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:174:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:177:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:180:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:186:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:189:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:192:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:195:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:198:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:204:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:207:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:210:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:213:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:216:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:222:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:225:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:228:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:231:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:234:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:237:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:243:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:252:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:255:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:264:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:272:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:277:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:285:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:288:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:293:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:296:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:299:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:304:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:309:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:314:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:317:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:320:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:323:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:329:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:334:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:360:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:363:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:366:Warning [231] No memory has been reserved by this instruction.

_output\pic18f452.asm:378:Warning [231] No memory has been reserved by this instruction.

==========================================================================

Compiling mtc.c

at 1: warning 117: unknown compiler option '--fstack' ignored

==========================================================================

Compiling main.c

at 1: warning 117: unknown compiler option '--fstack' ignored

==========================================================================

Linking project

==========================================================================

Converting to project.syx

Block 003000-0033FF allocated - Checksum: 34

Block 003400-0037FF allocated - Checksum: 4C

Block 003800-003BFF allocated - Checksum: 49

Block 003C00-003FFF allocated - Checksum: 41

Block 004000-0043FF allocated - Checksum: 6C

Block 004400-0047FF allocated - Checksum: 67

==========================================================================

SUCCESS!

D:\_matoz25\clockbox_v1_1>

Link to comment
Share on other sites

I've installed the following versions of the tools :

ActivePerl 5.10.0 Built 1002

GP Utils 0.13.5

SDCC 2.8.0

Can you help me (see previous answer in this topic) ?

Thanks.

--

Voici les versions des outils que j'ai installé :

ActivePerl 5.10.0 Built 1002

GP Utils 0.13.5

SDCC 2.8.0

Pouvez-vous m'aider pour que je puisse arriver à compiler correctement (cf ma précedente réponse dans ce sujet) ?

Merci.

Link to comment
Share on other sites

Hi,

You say that my program compiles correctly, but I don't understand why the .hex file I've got and the .hex that I've download on your website are different  ???

Thanks

--

Bonjour,

Vous dites que mon programme compile correctement, mais ce que je ne comprends pas ce sont les différences entre le fichier .hex que j'obtiens et le fichier .hex téléchargé sur le site.

Merci

Link to comment
Share on other sites

Hi,

Matoz25 have tested my syx file and he says to me that it does not function :

When clockbox reboots after syx file download, the LCD displays "rebooting MIOS" and anything else appends.

Here is anybody here that use same versions of tools than me ?

Should I change any settings in the tools ?

Should I edit make.bat ?

Thanks  ;)

--

Bonjour,

Matoz25 vient d'essayer le programme que j'ai compilé et il ne fonctionne pas :

Quand la clockbox redémarre, ce qu 'elle doit faire après tout téléchargement, l' affichage reste bloqué sur "rebooting MIOS". et l' application ne se met pas en route...

Quelqu'un ici utilise t il les mêmes versions des langages de programmation ?

Y'a t il des choses à paramètrer ?

Faut il modifier make.bat ?

Merci  ;)

Link to comment
Share on other sites

  • 2 weeks later...

salut à tous,

je voudrais savoir si c' est possible que la clockbox puisse être esclave? c' est à dire si elle peut être démmarée par une autre machine et transmettre la synchro?

Et le top, ce serait que ça se fasse automatiquement comme seqV3 lorsqu' il reçoit une synchro...

Et je me dit que si SeqV3 le fait, ça doit être possible pour la clockbox? 

Link to comment
Share on other sites

  • 4 weeks later...

Le sujet a évolué sur la section "mios programming C" , subject: "clockbox in slave mode"  et il a été résolu. Merci Rémy  ;)

Vous y trouverez le fichier .hex et le code source.

La clockbox se met automatiquement en slave mode dès qu' elle reçoit une synchro, et retourne en mode master lorsque le maître a stoppé. Avec affichage en 16 mesures.

Merci pour votre aide!  8)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...