USB Driver?

Forum de support pour les locuteurs de la langue française qui souhaitent écrire dans leur langue maternelle.

Moderator: Benj

Post Reply
tech
Posts: 353
Joined: Tue Sep 23, 2008 9:39 am
Been thanked: 9 times
Contact:

USB Driver?

Post by tech »

Bonjour,

Voici mon problème, j'ai réalisé un petit software sous flowcode v6 pour communiquer d'un PC a un microcontrôleur via USB. Le PIC utilisé et le PIC18F2455.

J'ai brancher le PIC à mon PC et celui si la bien détecter mais il ne reconnais pas le driver alors j'ai générer le driver dans flowcode et je suis incapable de l'installer :?

Comment je peux résoudre ce problème?

Merci

Chris
Attachments
Serial Bus_1.png
(34.37 KiB) Downloaded 6056 times
Serial Bus_0.png
(11.4 KiB) Downloaded 6056 times
USB LED Control v1.fcfx
(39.84 KiB) Downloaded 244 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Driver?

Post by Benj »

Bonjour Chris,

De votre projet Je suppose que vous avez un cristal de 20MHz . Voici une version légèrement modifiée de votre programme qui devrait mettre en place la configuration correctement pour permettre à l' USB pour être à la bonne vitesse pour fonctionner.
USB LED Control v1.fcfx
(39.83 KiB) Downloaded 270 times

Hello Chris,

From your project I am assuming you have a 20MHz crystal. Here is a slightly modified version of your program which should set up the configuration correctly to allow the USB to be at the correct speed to function.
USB LED Control v1.fcfx
(39.83 KiB) Downloaded 270 times

tech
Posts: 353
Joined: Tue Sep 23, 2008 9:39 am
Been thanked: 9 times
Contact:

Re: USB Driver?

Post by tech »

Bonjour Ben,

Oui effectivement j'utilise un cristal de 20MHz. J'ai essayé votre version du programme est ça ne fonctionne pas, j'ai toujours le même problème :(

Le branchement entre le PC et le PIC et bon, le PIC ne devrait-il pas être détecté comme un port COM ??

Merci pour votre aide

Chirs

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Driver?

Post by Benj »

Bonjour Chris ,

Signifie un périphérique inconnu que le périphérique USB est en baisse , il est là, mais les données envoyées à partir il est corrompu , la cause principale en est le micro ne fonctionne pas à la vitesse correcte ( 48MHz ) .

Un deuxième test 1 flash est un bon moyen pour aider à résoudre les problèmes de synchronisation .
http://www.matrixtsl.com/wiki/index.php ... ED_flasher

Voici une autre tentative .
USB LED Control v1.fcfx
(39.83 KiB) Downloaded 261 times

Hello Chris,

An unknown device means that the USB device is flagging it is there but the data being sent from it is corrupted, the main cause for this is the micro is not running at the correct speed (48MHz).

A 1 second flash test is a good way to help troubleshoot timing issues.
http://www.matrixtsl.com/wiki/index.php ... ED_flasher

Here is another attempt.
USB LED Control v1.fcfx
(39.83 KiB) Downloaded 261 times

tech
Posts: 353
Joined: Tue Sep 23, 2008 9:39 am
Been thanked: 9 times
Contact:

Re: USB Driver?

Post by tech »

Bonjour Ben,

Voici j'ai fait un programme simple qui fait flasher une LED comme vous m'avez mentionné.

Au niveau de la configuration du cristal tous est correcte la LED flash!, le problème survient quand j'insère le component USB Serial et que je l'initialise la LED arrête de flasher :wink:

Je me demande si le VUSB doit etre connecter?

Merci

Chris
Attachments
USB LED Flash Test.fcfx
(6.37 KiB) Downloaded 266 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Driver?

Post by Benj »

La broche de puces VUSB doit être raccordé à la terre via un condensateur 220nF .


The chips VUSB pin should be connected to ground via a 220nF capacitor.

tech
Posts: 353
Joined: Tue Sep 23, 2008 9:39 am
Been thanked: 9 times
Contact:

Re: USB Driver?

Post by tech »

Bonjour Ben,

Effectivement une fois le condensateur 220nF installer et le driver updater ca fonction.

Je voudrais savoir comment insérer une variable string dans une décision et comment je peux les convertir? :wink:
J’envoie par USB des valeurs en string, la valeur 10 pour allumer la LED et la valeur 20 pour fermer la LED (voir le programme).

Pouvez-vous m’aider?

Merci
Attachments
USB LED Flash Test v2.fcfx
(6.91 KiB) Downloaded 255 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Driver?

Post by Benj »

Bonjour,

La fonction de comparaison de chaînes devrait vous permettre de faire des décisions fondées sur des cordes .

http://www.matrixtsl.com/wiki/index.php ... omparisons

par exemple vous pouvez taper ceci dans l'icône de la décision.

(compare$("TEST", testStringVar, 1) == 0)




Hello,

The string comparison function should allow you to do decisions based on strings.

http://www.matrixtsl.com/wiki/index.php ... omparisons

e.g. you can type this into the decision icon.

(compare$("TEST", testStringVar, 1) == 0)

tech
Posts: 353
Joined: Tue Sep 23, 2008 9:39 am
Been thanked: 9 times
Contact:

Re: USB Driver?

Post by tech »

Bonjour Ben,

J'ai essayé votre exemple et j'ai une erreur de syntaxe, pourriez-vous me fournir un exemple pour que je puisse bien comprendre :?

Merci

Chris

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Driver?

Post by Benj »

Bonjour Chris,
StringCompare.fcfx
(6.01 KiB) Downloaded 252 times

tech
Posts: 353
Joined: Tue Sep 23, 2008 9:39 am
Been thanked: 9 times
Contact:

Re: USB Driver?

Post by tech »

Bonjour Ben,

Merci pour les infos, mais finalement j'utilise Length = StringToInt$ (USBRead).

Pour ce qui est du programme il fonctionne bien mais j'aurais bien aimé envoyer des bytes aux lieux de string…..

Je vais poster très bientôt le programme de ce projet VB et Flowcode…. sur le forum des qu'il sera terminé.

Merci pour votre aide!

Chris

Post Reply