Skip to main content

Posts

Showing posts with the label Programming

WordPress: New HTML5- friendly theme

WordPress introduces a brand new theme, the Toolbox. Toolbox is a brand new theme that will give their users an opportunity to use some of stylish HTML5 elements with the Custom CSS upgrade. Toolbox, is  “a semantic, HTML5, canvas for CSS artists and an ultra-minimal set of super-clean templates for your own WordPress theme development.” (quoted from Mashable). Creators can use to the fullest the Toolbox markup to do anything  you want, and that what WordPress wants to you. Credits to sideradesign.com You can also use Toolbox in designing your own WordPress, theme for a self-hosted site. And to those, familiar with designing the WordPress themes, Toolbox  might confuse you because it is distinctively Sandbox-like. For More info, just visit this link: Mashable/ Dev & Design

Microcontroller program that count the number of "ABC" & "XYZ"

#include REG52.h char found1=0; char found2=0; char countABC=0; char countXYZ=0; void searchABCXYZ () interrupt 4 {     if (RI==1)     {         if (SBUF=='A')         {             found1=1;         }             else if ((SBUF=='B')&& (found1==1))         {             found1=2;         }             else if ((SBUF=='C')&& (found1==2))         {             countABC++;             found1=0;         }         ...

Traffic Light program code

#include int cnt=0; int x=0; char state=1; void tim0 () interrupt 1 {     TR0=0;         TH0=0x3C;     TL0=0xB0;     cnt++;     switch (state)     {         case 1:                 P0=0x01;                 if (cnt== 1200)                 {                     state=2;                     cnt=0;                 }                 break;         case 2:  ...

New Technologies of 2010

This year, 2010, many technologies will start this year with a bang. 2010 will bring new technologies that will give a great impact to us human. The list of technology below are according to http://techcrunch.com/2010/01/01/ten-technologies-2010/. The Tablet: It is the most anticipated product of the year.  The mythical tablet computer (which everyone seems to be working on).  There are beautiful Android tablets, concept tablets, and, of course, the one tablet which could define the category, the Apple Tablet.  Or iSlate or whatever it’s called.  If Steve Jobs is not working on a tablet, he’d better come up with one because  anything else will be a huge disappointment.Why do we need yet another computer in between a laptop and an iPhone?  We won’t really know until we have it.  But the answer lies in the fact that increasingly the Web is all you need.  As all of our applications and data and social lives move to the Web, the Tablet is the incar...

Interrupt in microcontroller

#include void ext0 () interrupt 0 {     P0=P0>>1;     if (P0==0)         P0=0x08; } void ext1 () interrupt 2 {     P0=P0<<1;     if (P0==0)         P0=0x10; } void main () {     char x;     P1=0x03;     P2=0x00;     P0=0x18;     EA=1;     EX0=1;     EX1=1;     IT1=1;     IT0=1;     while (1)     {         x=P1&0x03;         switch (x)         {             case 0:    P2=0x00;                     break;      ...

Data Transmit with Hi

#include void main () {   char x;   P0=0x03;   P1=0x00;   TMOD=TMOD&0x0F;   TMOD=TMOD| 0x20;   TH1=0xFD;   TL1=0xFD;   SCON=0x50;   PCON=PCON|0x80;   TR1=1;   while (1)     {       x=P0&0x03;       switch (x)         {             case 0:                 P1=0x00;                 break;             case 1:                 TI=0;                 SBUF='H';                 while (TI==0);          ...

C counter

#include void main () {     char xl,xh;     P0=0x00;     P1=0x00;     P2=0x00;     TMOD=TMOD&0xF0;     TMOD=TMOD|0x05;     TR0=1; while (1)  {   do    {     xh=TH0;     xl=TL0;    }    while (TH0!=xh);     P0=xl;     P1=xh; if ((TH0==0x01)&(TL0==0x90))   {   P2=0x01;   TR0=0;   TH0=0x00;   TL0=0x00;   TR0=1;   } else if ((TH0==0x00)&(TL0==0x01))  P2=0x00;  }  } }