Tech Notes 01
Tech Notes 01
MNL file) in
appropriate place
N.B if u can assign appropriate foot prints to each and every component then
making thing will be bit easy
2.open orcad layout
12. if u have some unrouted nets then do manual routing by pressing shove
track mode, edit segment mode, add/edit route mode buttons (each have
specific functions )
USBDIV: 20MHz / 5 = 4MHz input to the PLL which then generates 96MHz
9600 baud @ 48MHz with BRGH and BRG16 = 0 means the SPBRG should be
77 and not 31.
-----------------------VB coding
http://www.activexperts.com/serial-port-component/howto/vb/
============================================
////////////////////////////////////////////////////////////////////////////
///////
///////
///////
State Machine Concept
///////
///////
///////
////////////////////////////////////////////////////////////////////////////
///////
///////
///////
///////
///////
////////////////////////////////////////////////////////////////////////////
///////
Transitions
///////
////////////////////////////////////////////////////////////////////////////
/////// STMST1==>STMST5 for STMEV1
///////
///////
///////--------------------------------------------------------------///////
/////// STMST2==>STMST1 for STMEV3
/////// STMST2==>STMST10 for STMEV7
///////--------------------------------------------------------------///////
///////
///////
///////
///////
///////--------------------------------------------------------------///////
/////// etc........................
///////
/////// etc........................
///////
////////////////////////////////////////////////////////////////////////////
/////// When some extern event happens, one should call
///////
///////
///////
///////
////////////////////////////////////////////////////////////////////////////
enum
state{STMST1,STMST2,STMST3,STMST4,STMST5,STMST6,STMST7,STMST8,ST
MST9,STMST10}currentState;
enum
event{STMEV1,STMEV2,STMEV3,STMEV4,STMEV5,STMEV6,STMEV7,STMEV8,S
TMEV9,STMEV10}currentEvent;
default:
break;
}
}
// Other cases
default:
break;
}
}
default:
break;
}
}
break;
case STMST9: STMST9Handler(eventHappened);
break;
case STMST10: STMST10Handler(eventHappened);
break;
default:
break;
}
}
----------------------http://tiktakx.wordpress.com/2010/11/21/serial-port-interfacing-with-vb-net2010/
-----------===== 30f4013 projects====
http://electronics-base.com/eSite/index.php/projects/complete-projects/195microchip-microcontroller-dspic30f4013-blink-led-example-using-timercomplete-project
----------------dsPIC30F3014 and dsPIC30F4013
----------AN899 bldc
--------http://www.eetindia.co.in/ART_8800522138_1800001_NT_f462ff45.HTM
----------------------------------Bit Torrent Sync a P2P syncing solution
--------------------------------
http://my.safaribooksonline.com/book/electrical-engineering/semiconductortechnology/9780750689601/pic16-c-sequencecontrol/ifelse_and_switchcase#X2ludGVybmFsX0J2ZGVwRmxhc2hSZWFkZXI/
eG1saWQ9OTc4MDc1MDY4OTYwMS80Mg==
--------------------------------------------STATIC VARIABLES
Uninitialized static variables are allocated a permanent fixed memory
location. Static variables are local in scope to the function in which they are
declared, but may be accessed by other functions "via pointers" since they
have permanent duration.
Variables which are static are guaranteed to retain their value between calls
to a function, unless explicitly modified via a pointer.
------------------------------------------\\\\\\state machine
http://www.gedan.net/2008/09/08/finite-state-machine-matrix-style-cimplementation/
-http://tactilicio.us/2008/02/12/some-code-snippets-for-a-simple-c-statemachine/
--------------------********foo.h*********
/* declaration of myarray */
extern char myarray[50];
********foo.c**********
/* If include the declaration the compiler will tell you if it doesn't match the
definition */
#include "foo.h"
/* definition of myarray */
char myarray[50];
********bar.c**********
/* Include foo.h and myarray[ ] will be visible */#include "foo.h"
void myfunc( void )
{ myarray[5] = 0x55;}
--------------------------Variable declared in hi tech.
If you intend for the variables to be used by only one function, but want them
to "exist" when the function is not active, then you declare them static within
the function.
If you want them to be shared by multiple functions, then you declare them
outside any of the functions.
If you put them at the front of a .c file, then they will be available to all
functions within that .c file.
If you want them accessible to functions within another .c file, then you
declare them exactly the same in that .c file, but with the extern keyword.
Many linkers (I forget whether PICC's is one of them) will complain unless the
variables are declared without the extern keyword in exactly one .c file.
---------------------www.jhdlcd.com.cn
LCD JHD539
controller SPLC780D
--------------------------------------dsPIC30F3012(8Kword,18pin)
dsPIC30F3014(8Kword,30gpio,40pin,4timer)
dsPIC30F4013(16Kword,30gpio,40pin,7timer)
PIC18F4553(16Kword,35gpio,40pin,4timer)
PIC18F4523
-----------------------------------------
UINT16 x;
UINT8 RegValue = 0;
UINT8 RegValue1 = 0;
ReadRegister(Register01, &RegValue1);
ReadRegister(Register02, &RegValue2);
SSP2CON1 = 0x22; /* Configures SDo, SDI,SCK and SS pins as serial port pins.
Clock idle state Low and FOSC/64 */
INTCONbits.INT0IE = 0;
INTCONbits.INT0IF = 0;
void InitSPI_S(void)
{
TRISCbits.TRISC5 = 0; // Define SDO pin as output
TRISCbits.TRISC4 = 1; // Define SDI as Input
TRISCbits.TRISC3 = 1; // Define SCK as Input
TRISAbits.TRISA5 = 1; // Define chip select as Input
INTCONbits.INT0IE = 0;
INTCONbits.INT0IF = 0;
////pic877 PWM
////https://dl.dropbox.com/u/22020714/PIC16F877%20PWM%20Code.rar
http://saeedsolutions.blogspot.fr/2012/11/pic16f877-pwm-code-proteussimulation.html
--------------Pic877 lcd interfacing
http://www.edaboard.com/thread52184.html
----------------Wilmshurst, Tim (2010). Designing Embedded Systems with PIC
Microcontrollers: Principles and Applications. Elsevier.
------------------------------//// lcd interfacing
http://www.ekenrooi.net/lcd/lcd.shtml
-------------------------------------http://www.mwftr.com/book.html
-------------------------------------------------------------jhd12864e LCD
-----------------------------------------(20MHz crystal with two 30pF ceramic capacitor),
1MHZ-4MHZ 15pf
------------------------------------http://saeedsolutions.blogspot.fr/2012/11/pic16f877-led-blinking-codeproteus.html
----------------------------------------http://stackoverflow.com/questions/7277926/bitwise-operator-to-get-bytefrom-32-bits?rq=1
---------------------------------
http://rapidshare.com/files/34936883...ter_Design.pdf
http://rapidshare.com/files/34936882...c-inverter.pdf