Tuesday, February 9, 2010
2010 Technologies for PC
Year 2010 or early 2011 will be interesting for PC buyers who are thinking to buy a new computer. First of all, The USB 3.0 (SuperSpeed USB) will be available on many PC motherboards late this year. Another thing is a series of new microprocessors from Intel which intergrate GPU in their dice.
Friday, February 5, 2010
Embedded Systems Design Magazine
"Embedded Systems design" magazine ed. Feb 2010:
http://www.nxtbook.com/nxtbooks/cmp/esd0110/index.php#/0
http://www.nxtbook.com/nxtbooks/cmp/esd0110/index.php#/0
Tuesday, February 2, 2010
iPad, iSlate, Kindle or what?
Apple iPad was introduced by its CEO, Steve Jobs, last week. Despite its slickness and coolness, it still runs LED LCD screen. The new HP Tablet to-be-released will also be running LCD. Kindle from Amazon is in different direction. It uses a like-book screen from E Ink ( a spun off of MIT-lab company), but it only is black-and-white (though can display different grades of grey) and too slow for most of computing works today, except for reading e-books.
There is a new startup founded by Mary Lou Epsen (does OLPC [One Laptop Per Child] project click you?) that goes to a little bit different. Their claim the new LCD screen they are producing is a marriage between both worlds: the fast-response and colorful of LCD with reflection-light and power-saving of E-ink.
Looking at their website (http://www.pixelqi.com/about_us), most of their executives and board members hold Ph.D, either in optics, electrical engineering or physics. Quite impressive. The product they're making is called "Pixel Qi".
I was wondering why iPad doesn't use their screen for iPad? too expensive? I am eager to see a computer company to use their product for a power-efficient next generation tablet PC (I am no fan of Netbook. I agreed with Mr. Jobs in his presentation that Netbook is just a slow smaller-than-laptop PC running memory-hungry Windows XP or not-that-popular Linux).
I was thinking to get this iPad, but after reading an article about this Pixel-Qi on Popular Science magazine, I am thinking to just wait and see how people's responses surface later on and will decide later.
If you're in the market ready to throw some money for a new netbook, be patient and wait for the getting-hotter market of tablet computers to select the best of the breed.
There is a new startup founded by Mary Lou Epsen (does OLPC [One Laptop Per Child] project click you?) that goes to a little bit different. Their claim the new LCD screen they are producing is a marriage between both worlds: the fast-response and colorful of LCD with reflection-light and power-saving of E-ink.
Looking at their website (http://www.pixelqi.com/about_us), most of their executives and board members hold Ph.D, either in optics, electrical engineering or physics. Quite impressive. The product they're making is called "Pixel Qi".
I was wondering why iPad doesn't use their screen for iPad? too expensive? I am eager to see a computer company to use their product for a power-efficient next generation tablet PC (I am no fan of Netbook. I agreed with Mr. Jobs in his presentation that Netbook is just a slow smaller-than-laptop PC running memory-hungry Windows XP or not-that-popular Linux).
I was thinking to get this iPad, but after reading an article about this Pixel-Qi on Popular Science magazine, I am thinking to just wait and see how people's responses surface later on and will decide later.
If you're in the market ready to throw some money for a new netbook, be patient and wait for the getting-hotter market of tablet computers to select the best of the breed.
Thursday, January 28, 2010
How to Add HP-1020 on CUPS to Windows XP
This is the instruction to share a printer which is served by a Linux running CUPS server to Windows clients.
Assume the class name of the printer (as defined in CUPS) is HP_LaserJet_1020, and the Linux server's IP address is 192.168.0.11.
Add a network printer and in URI box, add: http://%3cip-address/ of cups server>/classes/<classname>
or, in this example:
http://192.168.0.11/classes/HP_LaserJet_1020
Assume the class name of the printer (as defined in CUPS) is HP_LaserJet_1020, and the Linux server's IP address is 192.168.0.11.
Add a network printer and in URI box, add: http://%3cip-address/ of cups server>/classes/<classname>
or, in this example:
http://192.168.0.11/classes/HP_LaserJet_1020
Thursday, December 17, 2009
LOGVECT.C
/* RESET AND INTERRUPT VECTORS
Modified-version of COSMIC-France's vector.c
(c) M. Lutfi Shahab
First creation : 8-Jan-1995
Modifications :
- Bugs found in Whitesmiths's vector.c (vector 9 contains Division
by Zero).
- RESET: Whitesmith always defined zk and sk by zero, but in this
file, user can modified it.
- exception handler now can only be a near address (appropiate use
for EVB under MCX16 kernel operation).
*/
#define _WSC_
#include "mcx16.h"
extern SYSTABLE SysTable;
extern @port void _stext(void); /* startup routine */
extern @port void SCITrmIsr(void); /* SCI transmit interrupt handler */
extern @port void SCIRcvIsr(void); /* SCI receive interrupt handler */
extern @port void _BerrIsr(void);
extern @port void DivZero(void);
extern @port void IllegalOpcode(void);
extern @port void _default(void);
static @port void _dummit(void);
const struct reset {
@far @port void (*rst)(void); /* reset + code extension */
unsigned int isp; /* initial stack pointer */
unsigned int dpp; /* direct page pointer */
@port void (*vector[58])(void); /* interrupt vectors */
} _reset = {
/*0000:*/ /* vector 0: (ixksk) = $0110
bank 0, stack at $1xxxx
start address :
[15:12] = reserved
[11:8] = initial ZK
[7:4] = initial SK
[3:0] = initial PK
*/
/*0002: */ _stext, /* vector 1, initial PC */
/*0004: */ 0x002E, /* vector 2, Stack Pointer, [15:0] = initial SP */
/*0006:*/ 0x0000, /* vector 3, direct page pointer,
initial IZ (Direct Page Pointer) */
/* BEGIN VECTORS */
/*000A:*/ _dummit, /* vector 5, Bus Error (BERR) */
/*0008:*/ _dummit, /* vector 4, Breakpoint (BKPT) */
/*000C:*/ (@port void *)0x02FA, /* vector 6, Software Interrupt (SWI) to call MCX16 services */
/*000E:*/ _default, /* vector 7, Illegal Instruction */
/*0010:*/ _default, /* vector 8, Divide by Zero */
/*0012:*/ _dummit, /* vector 9, Unassigned, Reserved */
/*0014:*/ _dummit, /* vector A, Unassigned, Reserved */
/*0016:*/ _dummit, /* vector B, Unassigned, , Reserved */
/*0018:*/ _dummit, /* vector C, Unassigned, Reserved */
/*001A:*/ _dummit, /* vector D, Unassigned, Reserved */
/*001C:*/ _dummit, /* vector E, Unassigned, Reserved */
/*001E:*/ _dummit, /* vector F, Uninitialized Interrupt */
/*0020:*/ _dummit, /* vector 10, Unassigned, Reserved */
/*0022:*/ _dummit, /* vector 11, Level 1 Interrupt Autovector */
/*0024:*/ _dummit, /* Vector 12, Level 2 Interrupt Autovector */
/*0026:*/ _dummit, /* Vector 13, Level 3 Interrupt Autovector */
/*0028:*/ _dummit, /* Vector 14, Level 4 Interrupt Autovector */
/*002A:*/ _dummit, /* Vector 15, Level 5 Interrupt Autovector */
/*002C:*/ _dummit, /* Vector 16, Level 6 Interrupt Autovector */
/*002E:*/ _dummit, /* Vector 17, Level 7 Interrupt Autovector */
/*0030:*/ _dummit, /* Vector 18, Spurious Interrupt */
/*0032:*/ _dummit, /* vector 19 user-defined interrupt */
/*0034:*/ _dummit, /* vector 1A user-defined interrupt */
/*0036:*/ _dummit, /* vector 1B user-defined interrupt */
/*0038:*/ _dummit, /* vector 1C user-defined interrupt */
/*003A:*/ _dummit, /* vector 1E user-defined interrupt */
/*003C:*/ _dummit, /* vector 1E user-defined interrupt */
/*003E:*/ _dummit, /* vector 1F user-defined interrupt */
/*0040:*/ _dummit, /* vector 20 user-defined interrupt */
/*0042:*/ _dummit, /* vector 21 user-defined interrupt */
/*0044:*/ _dummit, /* vector 22 user-defined interrupt */
/*0046:*/ _dummit, /* vector 23 user-defined interrupt */
/*0048:*/ _dummit, /* vector 24 user-defined interrupt */
/*004A:*/ _dummit, /* vector 25 user-defined interrupt */
/*004C:*/ _dummit, /* vector 26 user-defined interrupt */
/*004E:*/ _dummit, /* vector 27 user-defined interrupt */
/*0050:*/ _dummit, /* vector 28 user-defined interrupt */
/*0052:*/ _dummit, /* vector 29 user-defined interrupt */
/*0054:*/ _dummit, /* vector 2A user-defined interrupt */
/*0056:*/ _dummit, /* vector 2B user-defined interrupt */
/*0058:*/ _dummit, /* vector 2C user-defined interrupt */
/*005A:*/ _dummit, /* vector 2D user-defined interrupt */
/*005C:*/ _dummit, /* vector 2E user-defined interrupt */
/*005E:*/ _dummit, /* vector 2F user-defined interrupt */
/*0060:*/ _dummit, /* vector 30 user-defined interrupt */
/*0062:*/ _dummit, /* vector 31 user-defined interrupt */
/*0064:*/ _dummit, /* vector 32 user-defined interrupt */
/*0066:*/ _dummit, /* vector 33 user-defined interrupt */
/*0068:*/ _dummit, /* vector 34 user-defined interrupt */
/*006A:*/ _dummit, /* vector 35 user-defined interrupt */
/*006C:*/ _dummit, /* vector 36 user-defined interrupt */
/*006E:*/ _dummit, /* vector 37 user-defined interrupt */
/*0070:*/ (@port void *)&SysTable, /* vector 38 points to SysTable address */
/*0072:*/ (@port void *)0x81E, /* vector 39 as a null task */
/*0074:*/ SCIIsr, /* Vector 3A, Interrupt Service Routine SCI */
};
/* empty function to receive an undefined interrupt
*/
static @port void _dummit(void) /* just contains rti */
{
/* enter background debug mode */
_asm("BGND\n");
_asm("nop\n");
}
Modified-version of COSMIC-France's vector.c
(c) M. Lutfi Shahab
First creation : 8-Jan-1995
Modifications :
- Bugs found in Whitesmiths's vector.c (vector 9 contains Division
by Zero).
- RESET: Whitesmith always defined zk and sk by zero, but in this
file, user can modified it.
- exception handler now can only be a near address (appropiate use
for EVB under MCX16 kernel operation).
*/
#define _WSC_
#include "mcx16.h"
extern SYSTABLE SysTable;
extern @port void _stext(void); /* startup routine */
extern @port void SCITrmIsr(void); /* SCI transmit interrupt handler */
extern @port void SCIRcvIsr(void); /* SCI receive interrupt handler */
extern @port void _BerrIsr(void);
extern @port void DivZero(void);
extern @port void IllegalOpcode(void);
extern @port void _default(void);
static @port void _dummit(void);
const struct reset {
@far @port void (*rst)(void); /* reset + code extension */
unsigned int isp; /* initial stack pointer */
unsigned int dpp; /* direct page pointer */
@port void (*vector[58])(void); /* interrupt vectors */
} _reset = {
/*0000:*/ /* vector 0: (ixksk) = $0110
bank 0, stack at $1xxxx
start address :
[15:12] = reserved
[11:8] = initial ZK
[7:4] = initial SK
[3:0] = initial PK
*/
/*0002: */ _stext, /* vector 1, initial PC */
/*0004: */ 0x002E, /* vector 2, Stack Pointer, [15:0] = initial SP */
/*0006:*/ 0x0000, /* vector 3, direct page pointer,
initial IZ (Direct Page Pointer) */
/* BEGIN VECTORS */
/*000A:*/ _dummit, /* vector 5, Bus Error (BERR) */
/*0008:*/ _dummit, /* vector 4, Breakpoint (BKPT) */
/*000C:*/ (@port void *)0x02FA, /* vector 6, Software Interrupt (SWI) to call MCX16 services */
/*000E:*/ _default, /* vector 7, Illegal Instruction */
/*0010:*/ _default, /* vector 8, Divide by Zero */
/*0012:*/ _dummit, /* vector 9, Unassigned, Reserved */
/*0014:*/ _dummit, /* vector A, Unassigned, Reserved */
/*0016:*/ _dummit, /* vector B, Unassigned, , Reserved */
/*0018:*/ _dummit, /* vector C, Unassigned, Reserved */
/*001A:*/ _dummit, /* vector D, Unassigned, Reserved */
/*001C:*/ _dummit, /* vector E, Unassigned, Reserved */
/*001E:*/ _dummit, /* vector F, Uninitialized Interrupt */
/*0020:*/ _dummit, /* vector 10, Unassigned, Reserved */
/*0022:*/ _dummit, /* vector 11, Level 1 Interrupt Autovector */
/*0024:*/ _dummit, /* Vector 12, Level 2 Interrupt Autovector */
/*0026:*/ _dummit, /* Vector 13, Level 3 Interrupt Autovector */
/*0028:*/ _dummit, /* Vector 14, Level 4 Interrupt Autovector */
/*002A:*/ _dummit, /* Vector 15, Level 5 Interrupt Autovector */
/*002C:*/ _dummit, /* Vector 16, Level 6 Interrupt Autovector */
/*002E:*/ _dummit, /* Vector 17, Level 7 Interrupt Autovector */
/*0030:*/ _dummit, /* Vector 18, Spurious Interrupt */
/*0032:*/ _dummit, /* vector 19 user-defined interrupt */
/*0034:*/ _dummit, /* vector 1A user-defined interrupt */
/*0036:*/ _dummit, /* vector 1B user-defined interrupt */
/*0038:*/ _dummit, /* vector 1C user-defined interrupt */
/*003A:*/ _dummit, /* vector 1E user-defined interrupt */
/*003C:*/ _dummit, /* vector 1E user-defined interrupt */
/*003E:*/ _dummit, /* vector 1F user-defined interrupt */
/*0040:*/ _dummit, /* vector 20 user-defined interrupt */
/*0042:*/ _dummit, /* vector 21 user-defined interrupt */
/*0044:*/ _dummit, /* vector 22 user-defined interrupt */
/*0046:*/ _dummit, /* vector 23 user-defined interrupt */
/*0048:*/ _dummit, /* vector 24 user-defined interrupt */
/*004A:*/ _dummit, /* vector 25 user-defined interrupt */
/*004C:*/ _dummit, /* vector 26 user-defined interrupt */
/*004E:*/ _dummit, /* vector 27 user-defined interrupt */
/*0050:*/ _dummit, /* vector 28 user-defined interrupt */
/*0052:*/ _dummit, /* vector 29 user-defined interrupt */
/*0054:*/ _dummit, /* vector 2A user-defined interrupt */
/*0056:*/ _dummit, /* vector 2B user-defined interrupt */
/*0058:*/ _dummit, /* vector 2C user-defined interrupt */
/*005A:*/ _dummit, /* vector 2D user-defined interrupt */
/*005C:*/ _dummit, /* vector 2E user-defined interrupt */
/*005E:*/ _dummit, /* vector 2F user-defined interrupt */
/*0060:*/ _dummit, /* vector 30 user-defined interrupt */
/*0062:*/ _dummit, /* vector 31 user-defined interrupt */
/*0064:*/ _dummit, /* vector 32 user-defined interrupt */
/*0066:*/ _dummit, /* vector 33 user-defined interrupt */
/*0068:*/ _dummit, /* vector 34 user-defined interrupt */
/*006A:*/ _dummit, /* vector 35 user-defined interrupt */
/*006C:*/ _dummit, /* vector 36 user-defined interrupt */
/*006E:*/ _dummit, /* vector 37 user-defined interrupt */
/*0070:*/ (@port void *)&SysTable, /* vector 38 points to SysTable address */
/*0072:*/ (@port void *)0x81E, /* vector 39 as a null task */
/*0074:*/ SCIIsr, /* Vector 3A, Interrupt Service Routine SCI */
};
/* empty function to receive an undefined interrupt
*/
static @port void _dummit(void) /* just contains rti */
{
/* enter background debug mode */
_asm("BGND\n");
_asm("nop\n");
}
ADCTASK.C
/******************************************************************************
�����������������������������������������������������������������������������
� �
� ANALOG-TO-DIGITAL CONVERTING TASK �
� �
� Copyright (c) June, 1995 �
� by Lutfi Shahab �
� Instrumentation and Controls Laboratory �
� Dept. of Engineering Physics �
� Faculty of Industrial Technology �
� Institut Teknologi Bandung �
� �
� Date: 20/11/94 �
� �
� Platform : Motorola 68HC16 Microcontroller �
� Compiler : Whitesmith HC16 Compiler �
� Target : EPROM-targeted binary code �
� �
� Description: -Task and routines to access ADC-module of 68HC16 �
� �
� Functions: �
� �
� Summary: �
� The ADC module is mapped into 32 words of address space. Five words are �
� control/status registers, one word is digital port data, and 24 words �
� provide access to the results of ADC conversion (eight addresses for each �
� type of converted data). Two words are reserved for expansion. �
� The ADC module base address is determined by the value of the MODMAP bit �
� int the system integration module configuration register (SIMMCR). �
� The base address is normaly $FFF700 in the MC68HC16Z1. �
� Internally, the ADC has both a differential data bus and a buffered �
� IMB data bus. Registers not directly associated with AD conversion �
� functions, such as the MCR, the MTR, and the PDR, reside on the bufferd �
� bus, while conversion registers and result registers reside on the �
� differential bus. �
� �
� Registers that must be set prior operation: �
� ADMCR: �
� STOP = 0 (normal operation) �
� FRZ = 0 �
� SUPV = 1 (supervisory mode) �
� ADCTL0: �
� PRS = 1 (ADC clock = system clock/4 = 16.667 MHz/4) �
� STS = 0 (4 A/D clock periods in the sample time) �
� RES10 = 1 (10-bit conversion) �
� ADCTL1: �
� SCAN = 1 (continuous conversion) �
� MULT = 1 (sequential conversion of four or eight channels �
� selected by [CD:CA]) �
� S8CM = 1 (eight-conversion sequence) �
� CD = 0 (measured data at each channel stored into his register) �
� �
�����������������������������������������������������������������������������;
******************************************************************************/
#define _FAR_
#include <wslxa.h>
#include "_adc.h"
#include "mcx16.h"
#include "sysdef.h"
#define CLICK_T (16.256E-3) /* 1 clock tick = 16.256 mS */
#define TICK1 (1000/16) /* 1 second */
#define TICK2 (1000/16)
/*
It's difficult to find out how time constant of thermocouple is,
but for bare thermocouple, however, extensive reseach and testing
have provided semi-empirical formulas that allow calculation of the time
constant with fair accuracy. One such relation useful for temperatures
from 160 - 1600 F, wire diameter 0.016 - 0.051 in, mass velocity 3 - 50
lbm/(ft3.s), and static pressure of 1 atm is:
t = (3500*rho*c*d^1.25 * pow(G, -15.8* sqrt(T)))/T, where
rho = mass density of two thermocouple materials, lbm/ft3
c = average specific heat of two thermocouple materials, Btu/(lbm.F)
d = wire diameter (in)
G = flow mass velocity, lbm/(ft2.s)
T = stagnation temperature, R
(adapted from Doebelin, MEASUREMENT SYSTEMS,...)
*/
/*********
THIS JUST FOR CLARITY !
ADC has been initialized by STARTUP.S
*******/
/*****
void ADC_init(void)
{
admcr.reg = ADMCR_SUPV;
admcr.reg = 0x0010;
adctl0.reg = 0x0083;
adctl1.reg = 0x0077;
}
******/
WORD adcdata[N_ADC_CHANNELS];
void ADC_Task(void)
{
int i;
_mcx_timer(TICK1, TICK2, SAMP_SEMA); /* install timer */
FOREVER
{
/* wait until sample period begin */
_mcx_wait(SAMP_SEMA);
/* SCF is cleared when ADCTL1 is written and a conversion sequence begin */
adctl1.reg = 0x0077;
do {
} while (adstat.w.ccf==0); /* all channels completely converted ? */
/*******
if last channel scanned
send data to mailbox if polling has reached last channel.
signalling other task with ADC_SEMA
rescan ADC channels, starting from first channel
*******/
for(i=ADC_1; i<=N_ADC_CHANNELS; i++)
adcdata[i] = ur_adc_rslt[i];
_mcx_send_mbx(ADC_MBX, &adcdata, ADC_SEMA);
}
}
�����������������������������������������������������������������������������
� �
� ANALOG-TO-DIGITAL CONVERTING TASK �
� �
� Copyright (c) June, 1995 �
� by Lutfi Shahab �
� Instrumentation and Controls Laboratory �
� Dept. of Engineering Physics �
� Faculty of Industrial Technology �
� Institut Teknologi Bandung �
� �
� Date: 20/11/94 �
� �
� Platform : Motorola 68HC16 Microcontroller �
� Compiler : Whitesmith HC16 Compiler �
� Target : EPROM-targeted binary code �
� �
� Description: -Task and routines to access ADC-module of 68HC16 �
� �
� Functions: �
� �
� Summary: �
� The ADC module is mapped into 32 words of address space. Five words are �
� control/status registers, one word is digital port data, and 24 words �
� provide access to the results of ADC conversion (eight addresses for each �
� type of converted data). Two words are reserved for expansion. �
� The ADC module base address is determined by the value of the MODMAP bit �
� int the system integration module configuration register (SIMMCR). �
� The base address is normaly $FFF700 in the MC68HC16Z1. �
� Internally, the ADC has both a differential data bus and a buffered �
� IMB data bus. Registers not directly associated with AD conversion �
� functions, such as the MCR, the MTR, and the PDR, reside on the bufferd �
� bus, while conversion registers and result registers reside on the �
� differential bus. �
� �
� Registers that must be set prior operation: �
� ADMCR: �
� STOP = 0 (normal operation) �
� FRZ = 0 �
� SUPV = 1 (supervisory mode) �
� ADCTL0: �
� PRS = 1 (ADC clock = system clock/4 = 16.667 MHz/4) �
� STS = 0 (4 A/D clock periods in the sample time) �
� RES10 = 1 (10-bit conversion) �
� ADCTL1: �
� SCAN = 1 (continuous conversion) �
� MULT = 1 (sequential conversion of four or eight channels �
� selected by [CD:CA]) �
� S8CM = 1 (eight-conversion sequence) �
� CD = 0 (measured data at each channel stored into his register) �
� �
�����������������������������������������������������������������������������;
******************************************************************************/
#define _FAR_
#include <wslxa.h>
#include "_adc.h"
#include "mcx16.h"
#include "sysdef.h"
#define CLICK_T (16.256E-3) /* 1 clock tick = 16.256 mS */
#define TICK1 (1000/16) /* 1 second */
#define TICK2 (1000/16)
/*
It's difficult to find out how time constant of thermocouple is,
but for bare thermocouple, however, extensive reseach and testing
have provided semi-empirical formulas that allow calculation of the time
constant with fair accuracy. One such relation useful for temperatures
from 160 - 1600 F, wire diameter 0.016 - 0.051 in, mass velocity 3 - 50
lbm/(ft3.s), and static pressure of 1 atm is:
t = (3500*rho*c*d^1.25 * pow(G, -15.8* sqrt(T)))/T, where
rho = mass density of two thermocouple materials, lbm/ft3
c = average specific heat of two thermocouple materials, Btu/(lbm.F)
d = wire diameter (in)
G = flow mass velocity, lbm/(ft2.s)
T = stagnation temperature, R
(adapted from Doebelin, MEASUREMENT SYSTEMS,...)
*/
/*********
THIS JUST FOR CLARITY !
ADC has been initialized by STARTUP.S
*******/
/*****
void ADC_init(void)
{
admcr.reg = ADMCR_SUPV;
admcr.reg = 0x0010;
adctl0.reg = 0x0083;
adctl1.reg = 0x0077;
}
******/
WORD adcdata[N_ADC_CHANNELS];
void ADC_Task(void)
{
int i;
_mcx_timer(TICK1, TICK2, SAMP_SEMA); /* install timer */
FOREVER
{
/* wait until sample period begin */
_mcx_wait(SAMP_SEMA);
/* SCF is cleared when ADCTL1 is written and a conversion sequence begin */
adctl1.reg = 0x0077;
do {
} while (adstat.w.ccf==0); /* all channels completely converted ? */
/*******
if last channel scanned
send data to mailbox if polling has reached last channel.
signalling other task with ADC_SEMA
rescan ADC channels, starting from first channel
*******/
for(i=ADC_1; i<=N_ADC_CHANNELS; i++)
adcdata[i] = ur_adc_rslt[i];
_mcx_send_mbx(ADC_MBX, &adcdata, ADC_SEMA);
}
}
Subscribe to:
Posts (Atom)