Sunday, June 13, 2010

Real Nhl Goalie Helmets

Gremlins! Leon



Hi friend @ s!!
I tell them that James is very cold, especially in the mornings, so keep a good picture is acostadita knitting (except when they go to work) and so filled with friends at home.
This is a pink teddy bear, which I did for my cousin who wants everything in pink and, according to me, looks like Gizmo from the Gremlins movie, hahaha. Again
Amigurumi patterns used Collection, this magazine is that I love and always have very nice models.
A hug!




Saturday, June 5, 2010

Diaper Keg Invitation

PIC24FJ \u0026lt;-> LabView.


The following document details some of the functions and procedures to make a connection by CDC (serial port emulation) with a 18F family microcontroller with USB support and LabView. We welcome comments, corrections and / or corrections suggestions for this document.


Connection CDC PIC \u0026lt;-> LabView






The hardware used for this example has 5 Pushbuttons connected on port A (A1.. A5) and 8 leds on port B (B0.. B7).



 
<18f2550.h>
# include # fuses HSPLL, NOWDT, NOPROTECT, NOLVP, NODEBUG, USBDIV, PLL4, CPUDIV1 , VREG, NOPBADEN
# use delay (clock = 48000000) # define LED1

PIN_B0
# define LED2 LED3 PIN_B1
PIN_B2
# define # define # define LED4 PIN_B3
LED5 PIN_B4
#define LED6 PIN_B5
#define LED7 PIN_B6
#define LED8 PIN_B7

#define LED_ON output_low
#define LED_OFF output_high


#include
#include

void main(void) {

char c;
usb_init();

while (TRUE) {
if (usb_enumerated()) {
if (usb_cdc_kbhit()) {

c=usb_cdc_getc();

if (c=='1') output_toggle(LED1);
if (c=='2') output_toggle(LED2);
if (c=='3') output_toggle(LED3);
if (c=='4') output_toggle(LED4);
if (c=='5') output_toggle(LED5);
if (c=='6') output_toggle(LED6);
if (c=='7') output_toggle(LED7);
if (c=='8') output_toggle(LED8);

}

if (input_STATE(PIN_A5)==0){
delay_ms(800);
printf(usb_cdc_putc,"5\r");
}

if (input_state(PIN_A4)==0){
delay_ms(800);
printf(usb_cdc_putc,"4\r");
}

if (input_state(PIN_A3)==0){
delay_ms(800);
printf(usb_cdc_putc,"3\r");
}

if (input_state(PIN_A2)==0){
delay_ms(800);
printf(usb_cdc_putc,"2\r");
}

if (input_state (PIN_A1) == 0) {
delay_ms (800);
printf (usb_cdc_putc, "1 \\ r");}



}}}








Here's a video to complement the document ...






.

Wednesday, June 2, 2010

How Much Do Tombstones Cost

LabView DAQ by CDC and Guitar Hero



This is an application of USB connectivity in this particular case, using the emulation RS232 serial port using a PIC18F2550 microcontroller (You can use any of this family) to acquire analog data using analog-digital converter of the same, and sending this data to the PC and processed by LabView.
With LabView can do a lot of awesome things, and most impressive is the implementation time is very short, in minutes you can get a pretty powerful application.

used for this application components labview VISA for serial connection quickly but effective CHART GRAPH is used to plot the acquired data, and function to WRITE TO SPREAD SHEET save this data to a spreadsheet exel.

CLICK HERE FOR CODE [-/+]



 //-------------------------- -------------------------------------------------- ------- 
/ /
/ / More projects in: http://perfectalgorithm.blogspot.com
/ /
//------------------ --------------------------------------------------
-------------- / / This work is licensed under a
/ / Attribution-Noncommercial-Share Alike 2.5 Mexico Creative Commons.
/ / To view a copy of this license, visit:
/ / http://creativecommons.org/licenses/by-nc-sa/2.5/mx/
/ / or envie a card to Creative Commons, 171 Second Street, Suite 300,
/ / San Francisco, California 94105, USA.
//----------------------------------------------- ------------------------------------

# include \u0026lt;18F2550.h> # device ADC
= 10 # fuses
XTPLL, NOWDT, NOPROTECT, NOLVP, NODEBUG, USBDIV, PLL1, CPUDIV1, VREGEN, NOPBADEN
# use delay (clock = 48000000)


\u0026lt;usb_cdc.h>
# include # include \u0026lt;LCD1 . c> / / Change LCD adecuado por library.
\u0026lt;string.h>

# include # BYTE TRISA = 0x0F92
BYTE TRISB = # # BYTE PORTA =
0x0F93 0x0F80 0x0F81
# BYTE PORTB =
ADCON0 BYTE # = BYTE # 0x0FC2
ADCON1 0x0FC1
= BYTE # = cmwith 0x0FB4



char command [10];
adc_string char [ 10], int16
adc_dato;
int len \u200b\u200b= 0;
char c;

void command ();



void main (void) {

LCD_init ();
usb_init ();

TRISA = 0x0FF ;
TRISB = 0x00;
ADCON1 = 0x0F;
cmwith = 0x07;


setup_comparator (NC_NC_NC_NC);
setup_adc_ports (an0);
setup_adc (vss_vdd);
set_adc_channel (0);
setup_adc (adc_clock_internal);


printf (lcd_putc, "\\ fPerfectAlgorithm");
len = 0;


while (TRUE) {
if (usb_enumerated ()) {
if (usb_cdc_kbhit ()) {
c = usb_cdc_getc ();
command [len] = c;
len + +;
}
if (len> 2) {
commando ();
len = 0;}


}}}


envia_dato void () {
int i;
read_adc(ADC_START_ONLY);
while (bit_test(ADCON0,1));
adc_dato = read_adc(ADC_READ_ONLY);
sprintf(adc_string,"%Lu",adc_dato);
for(i=0;i&lt;strlen(adc_string)+1;i++) {
usb_cdc_putc(adc_string[i]);
while(!usb_cdc_putready());
}

}

void commando() {

if (Comando[0]=='G') { //----------- GDT
if (comando[1]=='D') {
if (comando[2]=='T') {
envia_dato();
}
}
}

}

CLICK HERE TO VIEW DOWNLOAD SOURCE LABVIEW / PIC [-/+]



The file contains the firmware for the PIC (. C Compiled CCS PCW) and SOURCE for LabView v8.6


http://rapidshare.com/files/395453831/Conexion_CDC_con_Labview.rar.html