Posted by
Unknown
at
7:07 PMon Wednesday, August 3, 2011
This is a little demonstration of how to use the pwm library to controle the speed motor (but you can use it in many different ways). the task: Read an analogic commande from a potentiometre and transform it to commande the speed motor. the code: unsigned int commande=0;//the value delivred by the poteintiometre unsigned int controle=0;//the puls width that commands the motor speed void main() {
adc_init();//analogic to digital converter module initialisation pwm1_init(10000);//Puls width modulation module initialisation with 10KHz pwm1_set_duty(controle);//the motor is stopped pwm1_start();
while(1){ commande=adc_read(0);//read anaolgic value from channel number 0 controle=(commande/4);//adapt the value of the control to the commande pwm1_set_duty(controle);//update the value of the pulse width } } simulation:
Posted by
Unknown
at
7:55 AMon Sunday, July 31, 2011
Bonjour tout le monde, Je vous présente mon projet qui consiste à un simple programme de gestion de stock qu'il sera mis à jour plusieurs fois dans le future inch'Allah.
Le programme est codé avec c# et la base de donnés est créer avec mysql. vous devez tout d'abord téléchargerle le pilote connector/net http://dev.mysql.com/downloads/connector/net/5.2.htmlqui va occupé à la connexion entre l'application c# et la base de donnés MySql.
Posted by
Unknown
at
5:16 PMon Wednesday, July 27, 2011
Dans le cadre d'un projet en matière technologie d’acquisition et d'interfaçage j'ai réaliser ce projet qui est mieux expliquer dans la photo en bas.
Schéma synoptique
l'interface:
La carte sur isis:
PCB sur ARES:
Code en c#
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO.Ports;
namespace WindowsFormsApplication1 { using ZedGraph; public partial class Form1 : Form { float temps=0; float consigne=0; float commande=0; float fecartold; float fIntegral = 0; float fDerive = 0; float freponseOld=0; byte[] buffer = new byte[8]; #region partie test pour une foction de transfert numerique float reponse = 0; #endregion public Form1() { InitializeComponent(); }
Le cahier de charge Réaliser un voltmètre simple qui mesure le ddp entre deux point et qui affiche cette tension sur un afficheur lcd Le code en mikroc: sbit LCD_RS at RD4_bit; sbit LCD_EN at RD5_bit; sbit LCD_D4 at RD0_bit; sbit LCD_D5 at RD1_bit; sbit LCD_D6 at RD2_bit; sbit LCD_D7 at RD3_bit;
sbit LCD_RS_Direction at TRISD4_bit; sbit LCD_EN_Direction at TRISD5_bit; sbit LCD_D4_Direction at TRISD0_bit; sbit LCD_D5_Direction at TRISD1_bit; sbit LCD_D6_Direction at TRISD2_bit; sbit LCD_D7_Direction at TRISD3_bit; // End LCD module connections float volt1=0X00; float volt2=0X00; char voltage[4];