background image

                           

                       

   

  

          

        

                      

12

      

 

30 

PB2 

MOSI 

PB2 – general purpose digital I/O 

Alternative functions: 

MOSI – SPI Master Data output, Slave Data input for SPI 

channel. When the SPI is enabled as a slave, this pin is 

configured as an input regardless of the setting of DDB2. When 

the SPI is enabled as a master, the data direction of this pin is 

controlled by DDB2. When the pin is forced to be an input, the 

pull-up can still be controlled by the PORTB2 bit. 

31 

PB1 

SCK 

PB1 – general purpose digital I/O 

Alternative functions: 

SCK – Master Clock output, Slave Clock input pin for SPI 

channel. When the SPI is enabled as a slave, this pin is 

configured as an input regardless of the setting of DDB1. When 

the SPI is enabled as a master, the data direction of this pin is 

controlled by 

DDB1. When the pin is forced to be an input, the pull-up can still 

be controlled by the PORTB1 bit. 

32 

PB0 

#SS 

PB0 – general purpose digital I/O 

Alternative functions: 

SS – Slave Port Select input. When the SPI is enabled as a 

slave, this pin is configured as an input regardless of the setting 

of DDB0. As a slave, the SPI is activated when this pin is driven 

low. When the SPI is enabled as a master, the data direction of 

this pin is controlled by DDB0. When the pin is forced to be an 

input, the pull-up can still be controlled by the PORTB0 bit. 

Table 31 and Table 32 relate the alternate functions of Port B to 

the overriding signals shown in Figure 33 on page 67. SPI MSTR 

INPUT and SPI SLAVE OUTPUT constitute the MISO signal, 

while MOSI is divided into SPI MSTR OUTPUT and SPI SLAVE 

INPUT. 

 

 

Detailed description of PB, PD, PE ports can be found in ATmega128 microcontroller datasheets. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   

Summary of Contents for MMnet102

Page 1: ... R FID H igh nim odules for m icrocontrollers Servers Prototyping Boards m i lers Starter Kits Em bedded W eb 51 AVR ST PIC m icrocontrol Speed In System s program m e rocontrollers Starter Kits Em be ards for 51 AVR ST PIC m ic PC B designing Evaluation Bo ollers M icroprocesor system s rs for AVR PIC ST m icrocontrl dded W eb Serw ers Prototyping m ers for AVR PIC ST m icroco H igh Speed In Syst...

Page 2: ... CIRCUIT 20 LED DIODES 21 3 CONNECTION OF THE MODULE WITH THE EXTERNAL WORLD 22 CONNECTION TO THE ETHERNET NETWORK 22 RS 232 INTERFACE 23 RS 485 INTERFACE 23 USB INTERFACE 24 RADIO LINK 24 LCD DISPLAY 25 EXTERNAL PERIPHERALS ON THE SYSTEM BUS 26 4 PROGRAMMING THE MODULE 27 ISP CONNECTOR 27 JTAG CONNECTOR 29 5 AN APPLICATION EXAMPLE 30 6 EVALUATION BOARD 31 7 SPECIFICATIONS 31 8 TECHNICAL ASSISTANC...

Page 3: ...realizing the algorithm of control of an industrial process The RTOS system has an extended interface for handling peripheral equipment thanks to which the communication with them occurs via drivers registered in the system The system has drivers for the Ethernet controller serial ports the 1 Wire bus the DS 1820 thermometer LCD display RTC clock and DataFlash memory The kernel of the RTOS system ...

Page 4: ... circuits Features Fast RISC microcontroller ATmega128 with up to 16 MIPS throughput Ethernet controller IEEE 802 3 10 100Mb s 128kB of in circuit programmable FLASH program memory 128KB of RAM memory 4kB of EEPROM memory Serial DataFlash memory 32 or 64Mbit 4 or 8MBytes 1 Flexible memory controller allowing suit address space to application requirements I2C Real Time Clock and battery socket 1 Re...

Page 5: ...versions denoted with letters from A to C or in accordance with individual orders Module MMnet102 A contains ATmega128 microcontroller Ethernet controller LAN91C111 128kB RAM Module MMnet102 B contains ATmega128 microcontroller Ethernet controller LAN91C111 128kB RAM One DataFlash 32Mb 4MB memory Real Time Clock with socket for lithium battery Module MMnet102 C contains ATmega128 microcontroller E...

Page 6: ... 0 without DataFlash memory 1 32Mb DataFlash 2 2x32Mb DataFlash 0 without battery socket 1 with CR2023 battery socket 3 6864 Crystal 3 6864 MHz 4 Crystal 4 MHz 6 Crystal 6 MHz 8 Crystal 8 MHz 11 059 Crystal 11 059 MHz 14 7456 Crystal 14 7456 MHz 16 Crystal 16 MHz Module pin out Figure 2 Module pin out top view ...

Page 7: ...DC3 25 26 PF2 ADC2 PF1 ADC1 27 28 PF0 ADC0 AREF 29 30 AGND A 5V 31 32 AGND Function in MMnet102 Name J2 Name Function in MMnet102 5V 1 2 GND 3 3V 3 4 GND Vbat 5 6 GND TPIN 7 8 TPIN TPOUT 9 10 TPOUT LEDLINK 11 12 LEDACT RESET 13 14 LEDDF WR 15 16 RD PD7 T2 17 18 PD6 T1 PD5 19 20 PD4 IC1 PD3 INT3 TxD1 21 22 PD2 INT2 RxD1 RTC SDA PD1 INT1 SDA 23 24 PD0 INT0 SCL RTC SCL PB7 OC2 PWM2 25 26 PB6 OC1B PWM...

Page 8: ...t Compare C The pin has to be configured as an output DDE5 set one to serve this function The OC3C pin is also the output pin for the PWM mode timer function 16 PE4 INT4 PE4 general purpose digital I O Alternative functions INT4 External Interrupt source 4 The PE4 pin can serve as an External Interrupt source OC3B Output Compare Match B output The PE4 pin can serve as an External output for the Ti...

Page 9: ...s enabled this pin can not be used as an I O pin The TDO pin is tri stated unless TAP states that shift out data are entered 23 PF5 ADC5 PF5 general purpose digital I O Alternative functions ADC5 Analog to Digital Converter Channel 5 TMS JTAG Test Mode Select This pin is used for navigating through the TAP controller state machine When the JTAG interface is enabled this pin can not be used as an I...

Page 10: ...ing activity of the DataFlash memory It can be used to connect an additional diode e g led out externally to the device case 15 WR Write strobe 16 RD Read strobe 17 PD7 T2 PD7 general purpose digital I O Alternative functions T2 Timer Counter2 counter source 18 PD6 T1 PD6 general purpose digital I O Alternative functions T1 Timer Counter1 counter source 19 PD5 PD5 general purpose digital I O 20 PD...

Page 11: ...Output Compare Match C output The PB7 pin can serve as an external output for the Timer Counter1 Output Compare C The pin has to be configured as an output DDB7 set one to serve this function The OC1C pin is also the output pin for the PWM mode timer function 26 PB6 OC1B PWM1B PB6 general purpose digital I O Alternative functions OC1B Output Compare Match B output The PB6 pin can serve as an exter...

Page 12: ...n of this pin is controlled by DDB1 When the pin is forced to be an input the pull up can still be controlled by the PORTB1 bit 32 PB0 SS PB0 general purpose digital I O Alternative functions SS Slave Port Select input When the SPI is enabled as a slave this pin is configured as an input regardless of the setting of DDB0 As a slave the SPI is activated when this pin is driven low When the SPI is e...

Page 13: ...l and external interrupt sources Internal watchdog timer More informations at Atmel s site Ethernet controller LAN91C111 One chip Ethernet controller with IEEE 802 3 10 100Mb s Internal 8kB SRAM memory for buffers Built in data prefetch function to improve performance Full duplex half duplex Support diagnostic LEDs The module is adapted to operate with the network controller with the use of interr...

Page 14: ...C language as environment variables and buffers often used in the program can be held in the basic memory while the space with the variable bank number can be used e g to collect measurement data large tables or buffers the access to which is not hampered by a change in bank number The Ethernet controller is under the address 0xC000 Maximum linear memory mode the Ethernet controller is at the end ...

Page 15: ...e Description 7 SEL2POL SEL2 output polarization 0 active low level 6 5 SEL2CFG1 SEL2CFG0 Operating mode of SEL2 output 4 SEL1POL SEL1 output polarization 0 active low level 3 2 SEL1CFG1 SEL1CFG0 Operating mode of SEL1 output 1 0 MODE1 MODE0 Operating mode of the address decoder This register is assigned only for writing An attempt of readout will return only random values Two lowest bits of the M...

Page 16: ...RAM of the uC 65280B The remaining bits of the configuration register serve to set the operating mode of the SEL outputs and their polarization Mode SEL1CFG1 0 Description 0 00 Write strobe A pulse is generated at the moment of writing under the address 0xFF04 0xFF07 Polarization of the pulse is set by the SEL1POL bit 1 01 Read strobe A pulse is generated at the moment of reading under the address...

Page 17: ...M memory output SEL2 is used as the highest bit of the address bus in this case it must operate in mode 3 and cannot be used outside the module If the module is fitted with a 128kB of RAM memory output SEL2 in mode 3 can be used as additional output It takes then the state of bit 3 in the MMnet102_BANKSR register The drawings below illustrate the operation of output SEL during writing or reading o...

Page 18: ...active low level SELxPOL 0 x x SELx WR RD ADDR 0xFF04 0xFF07 SEL1 0xFF08 0xFF0B SEL2 Figure 6 Operation of SEL output as read strobe SELxCFG1 0 01 with active high level SELxPOL 1 x x SELx ADDR 0xFF04 0xFF07 SEL1 0xFF08 0xFF0B SEL2 Figure 7 Operation of SEL output as address decoder SELxCFG1 0 10 with active low level SELxPOL 0 ...

Page 19: ...les The memories are connected to a fast SPI bus with 8 MB s transmission speed Memory chips are activated after applying a low logic level to CS inputs The CS pin of memory No 1 is connected to port PB5 of the microcontroller and that of memory No 2 to port PB6 The SPI bus occupies three terminals of the microprocessor PB1 PB2 PB3 It should be kept in mind that if DataFlash memories are installed...

Page 20: ...s a regulated 5 V supply voltage The 3 3 V voltage indispensable for the operation of some circuits is produced inside the module It is also led out externally to be used by other system elements RESET circuit The MMnet102 has a built in voltage monitoring circuit constructed around the DS1811 integrated circuit The circuit generates a RESET signal in case when the supply voltage value is lower th...

Page 21: ...J1_25 ADC2 J1_26 ADC1 J1_27 ADC0 J1_28 AREF J1_29 AGND J1_30 A 5V J1_31 AGND J1_32 5V J2_1 GND J2_2 3 3V J2_3 GND J2_4 Vbat J2_5 GND J2_6 TPIN J2_7 TPIN J2_8 TPOUT J2_9 TPOUT J2_10 LED_LINK J2_11 LED_ACTIV J2_12 RESET J2_13 LED_DF J2_14 WR J2_15 RD J2_16 PD7 J2_17 PD6 J2_18 PD5 J2_19 PD4 J2_20 PD3 J2_21 PD2 J2_22 PD1 J2_23 PD0 J2_24 PB7 J2_25 PB6 J2_26 PB5 J2_27 PB4 J2_28 PB3 J2_29 PB2 J2_30 PB1 J...

Page 22: ...hnology and powering the module through the Ethernet cable Examples of both solutions are shown in the drawings below LAN_GND AC2 AC1 GND LAN LAN_GND TX 1 TX 2 RX 3 4 5 RX 6 7 8 SH1 SH2 RJ45 10n 100n 10n 2kV LAN_GND GND TPIN TPOUT TPIN TPOUT 9 10 11 12 13 14 15 16 8 7 6 3 2 1 5 4 RCV XMIT TG110 S050N2 3 3V 75R 75R Figure 13 Connection to the Ethernet using a transformer TPIN TPOUT TPIN TPOUT LAN_G...

Page 23: ...acilitates long distance transmission in a difficult environment An implementation of this interface is as simple as that of RS 232 and requires only a line driver e g MAX485 The feature discerning this interface from RS 232 is the necessity to control the direction of action of the driver transmission reception This control is effected through the program using any I O pin of the microcontroller ...

Page 24: ...re 17 Connection of the USB port to the MMnet102 Additional information on the MMusb232 module can be found on the web page http www propox com products t_93 html lang en Radio link Fitting the system with the possibility of communicating via a wireless path provides a possibility of easy control and collection of measurement data from system elements dispersed in the object without the need to in...

Page 25: ...ction of the LCD display to microcontroller ports Another way is to use the system bus led out from the module and the write strobe output The method of connecting them is shown below 1 2 3 4 5 6 7 8 9 10 11 12 13 14 LCD 16x2 100n GND 5V A0 5V GND AD1 AD5 AD7 AD3 AD6 AD0 AD2 AD4 SEL1 7k5 620R HD44780 GND VCC CONT RS RW E D7 D0 D1 D2 D3 D4 D5 D6 GND Figure 19 Connection of the LCD display to the mi...

Page 26: ...14 Q4 15 Q3 16 Q2 17 Q1 18 Q0 19 VCC 20 74HCT574 Figure 20 An example of using the SEL output and a write read strobe The configuration and write read methods of registers such connected looks like this MMnet102_CONF 0b00100001 SEL2 read strobe active low SEL1 write strobe active high memory decoder mode 1 MMnet102_SEL1 output_value write to output register input_value MMnet102_SEL2 read from inpu...

Page 27: ...4 AD5 AD6 AD7 OE 1 D0 2 D1 3 D2 4 D3 5 D4 6 D5 7 D6 8 D7 9 GND 10 CP 11 Q7 12 Q6 13 Q5 14 Q4 15 Q3 16 Q2 17 Q1 18 Q0 19 VCC 20 74HCT574 Figure 21 An example of using the SEL output as an address selection output 4 Programming the module The ATmega128 microcontroller has 128kB of Flash memory programmable in the system for the program code and 4kB of EEPROM memory for user s data Programming of the...

Page 28: ...MISO SCK RST LED MOSI ISP 1k 5V Figure 22 Connecting the MMnet102 module with an ISP connector AD7 J1_1 AD6 J1_2 AD5 J1_3 AD4 J1_4 AD3 J1_5 AD2 J1_6 AD1 J1_7 AD0 J1_8 A1 J1_9 A0 J1_10 SEL2 J1_11 SEL1 J1_12 PE7 J1_13 PE6 J1_14 PE5 J1_15 PE4 J1_16 PE3 J1_17 PE2 J1_18 PE1 J1_19 PE0 J1_20 ADC7 J1_21 ADC6 J1_22 ADC5 J1_23 ADC4 J1_24 ADC3 J1_25 ADC2 J1_26 ADC1 J1_27 ADC0 J1_28 AREF J1_29 AGND J1_30 A 5V...

Page 29: ...equipment and program pitfalls inspection and modification of contents of registers and data memories Apart from this functions are available offered by ISP programmers programming and readout of Flash EEPROM fuse memories and lock bites The method of connecting the JTAG connector to the minimodule is shown in the drawing AD7 J1_1 AD6 J1_2 AD5 J1_3 AD4 J1_4 AD3 J1_5 AD2 J1_6 AD1 J1_7 AD0 J1_8 A1 J...

Page 30: ...ly of power AD7 J1_1 AD6 J1_2 AD5 J1_3 AD4 J1_4 AD3 J1_5 AD2 J1_6 AD1 J1_7 AD0 J1_8 A1 J1_9 A0 J1_10 SEL2 J1_11 SEL1 J1_12 PE7 J1_13 PE6 J1_14 PE5 J1_15 PE4 J1_16 PE3 J1_17 PE2 J1_18 PE1 J1_19 PE0 J1_20 ADC7 J1_21 ADC6 J1_22 ADC5 J1_23 ADC4 J1_24 ADC3 J1_25 ADC2 J1_26 ADC1 J1_27 ADC0 J1_28 AREF J1_29 AGND J1_30 A 5V J1_31 AGND J1_32 5V J2_1 GND J2_2 3 3V J2_3 GND J2_4 Vbat J2_5 GND J2_6 TPIN J2_7 ...

Page 31: ...sformer RS232 port ISP connector JTAG connector 2x16 chars LCD display 8 LED diodes 4 push buttons 2 potentiometers Prototype design area 7 Specifications Microcontroller ATmega128 16MHz Ethernet controller LAN91C111 IEEE 802 3 10 100Mb s Program memory 128kB Data memory 128kB or 256kB EEPROM memory 8kB DataFlash memory up to 8MB No of digital I O up to 32 No of analog inputs up to 8 Power 5V 5 Di...

Page 32: ... setting of resistors a detailed description of the problem 9 Guarantee The MMnet102 minimodule is covered by a six month guarantee All faults and defects not caused by the user will be removed at the Producer s cost Transportation costs are borne by the buyer The Producer takes no responsibility for any damage and defects caused in the course of using the MMnet 02 module 10 Assembly drawings ...

Page 33: ...33 Figure 28 Assembly drawing top layer Figure 29 Assembly drawing bottom layer ...

Page 34: ...34 11 Dimensions Figure 30 Dimensions top view Figure 31 Dimensions side view 12 Schematics ...

Page 35: ... 6 VCC 8 GND 24 A17 9 U2 RAM_A16 5V RAM_SEL RAM_SEL RD WR AD0 AD2 AD1 AD6 AD4 AD5 AD7 AD3 ALE A14 A8 A10 A12 A9 A13 A15 A11 RESET RAM_A15 RAM_A16 SEL2 LAN_SEL PE3 PE5 PE6 PE7 PE2 PE4 PE1 PE0 ADC0 ADC2 ADC6 ADC4 ADC5 ADC1 ADC7 ADC3 PD0 PD1 PD2 PB3 PD7 PB0 PD6 PB2 PD5 PD3 PB4 PB6 PD4 PB1 PB5 PB7 RESET AREF AGND AGND A 5V 5V AD6 AD0 AD2 AD4 AD1 AD5 AD7 AD3 3 3V GND GND SEL1 SEL2 TPIN TPIN TPOUT TPOUT...

Page 36: ...ADS 37 LCLK 42 ARDY 38 RDYRTN 46 SRDY 43 INTR0 29 LDEV 45 RD 31 WR 32 DATACS 34 CYCLE 35 W R 36 VLBUS 40 VDD 1 VDD 33 VDD 44 VDD 62 VDD 77 VDD 98 VDD 110 VDD 120 AVDD 11 AVDD 16 VSS 24 VSS 39 VSS 52 VSS 57 VSS 67 VSS 72 VSS 93 VSS 103 VSS 108 VSS 117 AVSS 13 AVSS 19 TPO 14 TPO 15 TPI 17 TPI 18 LNK 20 LBK 21 CNTRL 28 RBIAS 12 LEDA 22 LEDB 23 RXD3 121 RXD2 122 RXD1 123 RXD0 124 TXD3 113 TXD2 114 TXD...

Reviews: