ucGUI从NOR FLASH加载字库

转自:星心乱舞  http://hi.baidu.com/chinleo/item/370cb3817918205f27ebd96a

CPU:LPC2478 NOR Flash:MX29LV640EB

typedef __packed struct {     U8  XSize;     U8  XDist;     U8  BytesPerLine;     const unsigned char GUI_UNI_PTR * pData; } GUI_CHARINFO;

在我的平台下,外部NOR Flash的起始地址是0x80000000,其容量是8MB。我使用ucGUI提供的字库工具生成的4位抗锯齿字库大小为1.8M字节(此为经过计算后纯字库数据的大小)。考虑到字库内容的连续性,在NOR Flash中为字库存储分配一个固定的区域,在我的工程中将其配置为0x80600000,从该地址开始还有2M的存储空间。 Continue reading

Battery Operated Latching Power Switch

Sometimes you need a high side latching power switch that will work well with low voltage, such as that produced by batteries.  Two AAA or AA battery cells in series produce, depending on the state of charge and battery chemistry, between 1.8 and 3.5 volts.  The MOSFET switch circuits shown on the following pages operate well with voltages from 5V to 18V, but will fail to switch on reliably at lower voltages:

Their voltage limitation is entirely the result of their gate threshold voltage, VGS-TH.  These circuits use the IRF7319 MOSFET pair, whose transistors  start turning on at VGS-TH=1V (for only 250 uA current) and are strongly ON at VGS=3V.  You’ll notice from their datasheet that at VGS=3V they can pass more than an amp with an ON resistance of less than 0.1 ohm.  So, they are strongly ON at 3V.  However, you’ll notice that the MOSFETs datasheet doesn’t specify where in that 1V to 3V gap they start turning ON strongly.  The datasheets show graphs with VGS starting only at 3V.  At that voltage, the RDS-ON starts climbing very quickly as VGS decreases, for VGS < 3V.

You can extend the range of those circuits to lower input voltages by choosing appropriate MOSFET transistors, for example the Si3588DV MOSFET pair.  It turns on fully at VGS ≥ 1.5V (and the datasheet graphs show the curves at VGS as low as 1.5V) but can’t pass as much current as the IRF7319.  Further, it’s maximum VGS is 8V, so the battery voltage must be less than that.

The circuit of Figure 1, using the Si3588DV MOSFET pair, works well with input voltages from 1.5V to 7.5V, making it suitable for use with two, three or four standard batteries in series.

http://www.mosaic-industries.com/embedded-systems/_media/microcontroller-projects/electronic-circuits/push-button-switch-turn-on/battery-operated-high-side-latching-mosfet-power-switch.png

Fig. 1  Latching power switch for battery operation

This circuit exhibits a Press-ON-Hold-OFF action, where a short press turns power to the electronic load ON, but a longer button hold is needed to toggle it back OFF.

You can use the Si3588DV MOSFET pair in the other high-side switch circuits with limited in-rush current, microcontroller turn-OFF, or toggle behavior shown on the pages cited above, provided you keep in mind the MOSFET’s maximum safe VGS of 8V.

  • fafsdsadsadsadas