The present invention is related to a flash memory circuit, and more particularly to a flash memory circuit for supporting an IDE apparatus.
Flash memory is a non-volatile memory, so stored data is not erased when it is powered off. Moreover, the stored data can be changed instantly and can typically be changed from thousands to tens of thousands of times in a flash memory's lifetime. Hence, flash memory has been popularly used in many electrical devices for storing data due to these factors plus its increasingly low price.
There are a lot of storage mediums today. However, the access interfaces of these storage mediums are often not compatible with each other. For example, the access interface of flash memory cannot be used to access IDE memory. Therefore, when a flash memory and an IDE memory are together used in an electrical device, it is necessary to form two access circuits for accessing the two different memories, which increases the cost and the volume of the electrical device.
Therefore, an access circuit that can access flash memory and IDE memory together is desired.
The main purpose of the present invention is to provide a flash memory circuit that can also access IDE memory.
Another purpose of the present invention is to provide an access circuit that can access the flash memory and the IDE memory together.
According to the foregoing purposes, the present invention provides a flash memory circuit that can also access an IDE apparatus. This flash memory circuit includes a flash memory controller, a latch circuit and an IDE apparatus. The flash memory controller outputs a latch signal to control the latch circuit to access a special address signal and output a RD/WR signal. The RD/WR signal is used to access data according to the special address signal.
In an embodiment, the present invention provides a method of using a flash memory circuit to access an IDE apparatus. First, a latch signal is enabled by a flash memory controller to activate a latch circuit to latch a special address signal. Next, the latch signal is disabled to latch the special address signal in the latch circuit. Finally, the data in the IDE apparatus is accessed according to the address signal in the latch circuit.
In another embodiment, the present invention provides a direct memory access method for an IDE apparatus. First, conditions in a firmware are set. The clock signals for accessing the IDE apparatus and accessing the flash memory are set to be the same. A special accessing number and address are set for accessing data. When accessing, a latch signal is enabled for setting the special address in a latch circuit. Then, the latch signal is disabled to latch the special address in the latch circuit. Finally, a flash memory controller can access the IDE apparatus according to the set accessing number and the address.
The foregoing aspects and many of the attendant advantages of this invention are more readily appreciated and better understood by referencing the following detailed description, when taken in conjunction with the accompanying drawings, wherein:
In a NAND-type flash memory, the data and address lines use the same bus. Therefore, the data can be serially accessed. However, in an IDE apparatus, the data and the address lines are separated. Therefore, the data cannot be serially accessed. In other words, when an electrical device has IDE memory and flash memory, different access circuits must be used to access different memories. The purpose of the present invention is to provide an access circuit to concurrently access these two memories. The following is an embodiment of the present invention.
The flash memory controller 101 may access a flash memory 104. The data and the address signal are transferred in a same bus 105 between the flash memory controller 101 and the flash memory 104. The control signals, such as latch signal (ALE), read signal (RD), write signal (WR) and choose signal (CS), are transferred through the control line 106.
The latch signal (ALE) runs out the flash memory controller 104 through the line 107 to control the latch circuit 102. The RD signal, WR signal and the CS signal are lead out through the lines 109, 110 and 111, respectively to control the IDE apparatus 103. The data and the address signals transferred from the flash memory 104 to the flash memory controller 101 through the bus 105 are sent to the latch circuit 102 and the IDE apparatus 103.
When the latch signal transferred in the line 107 from the flash memory controller 104 is enabled, this latch signal can control the latch circuit 102 to access the data and the address signal transferred in the line 108. On the other hand, when the latch signal is disabled, the data and address signal are latched in the latch circuit 102. Moreover, when the RD signal or the WR signal transferred in the line 109 or 110 is enabled, the IDE apparatus 103 is controlled to access the data and address signal transferred in the line 108.
Alternatively, in a flash memory, the data can be accessed in a page increments, where the size of a page is 512 Bytes. When accessing page data, the operation steps shown in
After these conditions are set to the firmware, when a page data is required to be accessed, a latch signal transferred in the line 107 is enabled by the flash memory controller 101 for setting the special address signal in the latch circuit 102. Next, the latch signal is disabled by the flash memory controller 101 to latch the special address signal in the latch circuit 102. Finally, the flash memory controller 101 can access the IDE apparatus 103 according to the set access count and the access address.
Accordingly, the access circuit of the present invention can be used to access the flash memory and the IDE apparatus concurrently, thereby reducing cost of the electrical device by simplifying it. Moreover, the access circuit can support the direct memory access (DMA) method to access the flash memory and the IDE apparatus, thereby increasing access efficiency.
As is understood by a person skilled in the art, the foregoing descriptions of the preferred embodiment of the present invention are an illustration of the present invention rather than a limitation thereof. Various modifications and similar arrangements are included within the spirit and scope of the appended claims. The scope of the claims should be accorded to the broadest interpretation so as to encompass all such modifications and similar structures. While preferred embodiments of the invention have been illustrated and described, it will be appreciated that various changes can be made therein without departing from the spirit and scope of the invention.