Difference between revisions of "Projets:Perso:2013:PlatineAvrUSB"

From Electrolab
Jump to: navigation, search
Line 25: Line 25:
  
 
En gros il vous faut deux diodes zener 3.6v 0.5W
 
En gros il vous faut deux diodes zener 3.6v 0.5W
 +
Le microC est un ATMEGA328P (ou PU).
  
 
[[File:Avrusbproto.PNG|400px|thumb|center|Schema du montage]]
 
[[File:Avrusbproto.PNG|400px|thumb|center|Schema du montage]]
 
  
 
[[File:AvrusbprotoKicad.jpg|400px|thumb|center|PCB sous kicad]]
 
[[File:AvrusbprotoKicad.jpg|400px|thumb|center|PCB sous kicad]]
 +
 +
Driver AVR USB
 +
 +
A changer dans le main afin que les ports utilisés soient les bons:
 +
<syntaxhighlight lang="C">
 +
 +
#define LED_PORT_DDR        DDRB
 +
#define LED_PORT_OUTPUT    PORTB
 +
 +
#define PWM_PORT_OUTPUT PORTD
 +
#define PWM_PORT_DDR DDRD
 +
 +
#define ONBOARDLED_BIT        5
 +
 +
#define LEDRED_BIT            4
 +
#define LEDGREEN_BIT          2
 +
#define LEDBLUE_BIT            3
 +
 +
#define LEDRED_PWM            5
 +
#define LEDGREEN_PWM          6
 +
#define LEDBLUE_PWM            3
 +
</syntaxhighlight>

Revision as of 12:27, 7 April 2013

Platine de test AVRUSB
Auteur Jnat
Date de proposition 20/02/2012
Tags du projet usbhid;
Lieu d'utilisation final @Work/Home
Utilisateur final Tout le monde
Type de projet

Projet personnel de Jnat

Projet Platine de test AVRUSB
  • Emulation en BitBanging de périphériques USB
  • Basé sur chipset AVR
  • USBHID



Platine AVRUSB

Vue d'ensemble

Le projet Avr Usb permet de créer des périphériques USB a partir d'un microcontrolleur AVR. Il est aussi possible de faire tourner le firware sur un arduino. Documentation sur [[1]]

Solution choisie

J'ai opté pour le montage qui utilise des diodes Zener a l'envers pour abaisser la tension du bus usb a 3.3v.

"Instead of reducing the AVR's power supply, we can limit the output voltage on D+ and D- with Zener diodes. We recommend 3.6 V low power types, those that look like 1N4148 (usually 500 mW or less). Low power types are required because they have less capacitance and thus cause less distortion on the data lines. And 3.6 V is better than 3.3 V because 3.3 V diodes yield only ca. 2.7 V in conjunction with an 1.5 kΩ (or more exactly 10 kΩ) pull-up resistor. With 3.3 V diodes, the device may not be detected reliably."

En gros il vous faut deux diodes zener 3.6v 0.5W Le microC est un ATMEGA328P (ou PU).

Schema du montage
PCB sous kicad

Driver AVR USB

A changer dans le main afin que les ports utilisés soient les bons:

#define LED_PORT_DDR        DDRB
#define LED_PORT_OUTPUT     PORTB
 
#define PWM_PORT_OUTPUT		PORTD
#define PWM_PORT_DDR		DDRD
 
#define ONBOARDLED_BIT         5
 
#define LEDRED_BIT             4
#define LEDGREEN_BIT           2
#define LEDBLUE_BIT            3
 
#define LEDRED_PWM             5
#define LEDGREEN_PWM           6
#define LEDBLUE_PWM            3