NEWTC



  • HOME
  • Customer Center
  • FAQ


hit : 2,539
title Notes for ATMEGA128 circuit design.
name admin 11-08-29 21:45

Basically, all ports are possible to use with GPIO. But, every port has a function respectively and so your caution is required for use of them. Followings are listed for a few general cautions

 

G port : Please be careful of /WR, /RD, ALE, control signal, which is used when you use external memory. If capacitor-connected circuit is made up between these parts and GND when being used spontaneously as external memory, there will be a high possibility that fails to access to external memory. Therefore, your caution is required so that you would not connect capacitor between these pins and GND.

 

F port: It is available for ADC.  For ADC, make sure that you adjust the voltage connected to external AREF to the output range of sensor if AREF is used for external voltage. Only so, you can gain the precise result. Voltage of AVCC and internal 2.56V ref are also available. In this case, you must not connect AREF because it is impossible to select if AREF is tied up to external DC voltage. In addition, if a capacitor is used between AREF and GND so that works as avoiding noise. Please note that it is impossible to use D4~D7 in this port which are relevant to JTAG pins if JTGAEN in fuse bit is set to Enable (0).  In this reason, JTAGEN in Fuse Bit is set to disable (1) so that all ports distributed by us can be used.  

 

E port: D0 and D1 are intended to also serve as RXD0 and TXD0 respectively. Therefore, if UART0 is initialized, D0 and D1 will be usually in a high voltage. In this case, it is possible to use for port. Thus, you need not worry why output of these pins is always placed in High.

 

D port: D2 and D3 is respectively intended to serve as RXD1 and TXD1. Therefore, if UART1 is initialized, D0 and D1 will be usually in a high voltage. In this case, it is possible to use for port. Thus, you need not worry why output of these pins is always placed in High.

 

B port: SCK pin in PB1 is very sensitive clock pin. For SPI communication, particularly this pin reacts sensitively. Therefore, ensure to let device place where is near SPI when you use this line as SPI, otherwise if it is difficult to do so, you must let noise be generated creating GUART line connected to outer ground on both sides and opposite PCB while you work for PCB cad and wrapping along the line. If you need high level of speed and precision, you must carry out this. It is also recommended that you close the noise from opposite side with GND plate creating it as roughly 4 layers.

 

Please note that it is difficult to use SCK because clock will not vibrate due to capacitor if capacitor is connected in the circuit between PB1 which has SCK pin and GND. If you are obliged to use capacitor or add other circuit to this pin, you must pass through approx. 1K ohm of serial resistance in PB1 or add other circuit to use capacitor. Otherwise, ISP downloading itself can have problem. We have often observed this case and you must be careful to avoid this fault.

Also, AVR is very sensitive to voltage. In case of AVR series that uses TTL Level of 5V, AVR works normally only in the range of 4.5~5.5V and if the voltage is applied beyond the said range, AVR can be broken shortly in some cases, further, if this condition continues long, AVR sometimes has a fault. But in case of this fault, ISP downloading failure can occur even if operation itself is not a problem. In addition, some pins don’t work or you encounter failure that has much heat in AVR chip even if they work normally. We recommend that you must replace chip because we are not sure how this case will work on after several hours will go by.


If you want to properly make use of many functions of AVR and memory in 8bit processor, you must design the part of power for stable circuit. Circuit design of the power part will be different depending upon if a system may generate heat or must not generate it or how much production cost a system will be designed.