Using the Arduino Ethernet shield with AMICUS18 (Part 1~4)

details

Using the Arduino Ethernet shield with AMICUS18 (Part 1~4)

by HenrikOlsson

He had very much activity on the forum of http://www.picbasic.uk, he posted it in this forum how to use the Arduino Ethernet Shield with AMICUS18 Open source hardware board based on PIC MCU.
The pisbasic made the 4 aticles with his posts.


AMICUS18 board

This board is based on PIC MCU and is compatible with Arduino Board. It is developed with Crownhill’s Proton BASIC.


Part 1

In Part One, He explains how to connect the Ethernet Shield with AMICU18 board.

  • Because AMICUS18 board has no ICSP HEADER, Ethernet shield is modified for sharing the SD card on the Ethernet shield.

[Learn More…]


Part 2

In Part Two, He explains how to define the interface for controlling UART, SPI interface, and W5100 memory map.

  • Code
    ' By default the AMICUS18 board uses the PIC18F25K20, make sure to
    ' set up MCSP or whatever IDE is being used to compile for the
    ' correct device.
    
    DEFINE OSC 64
    DEFINE LOADER_USED 1            ' We're using a bootloader.
    DEFINE HSER_RCSTA 90h           ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h           ' Enable transmit, BRGH = 1
    DEFINE HSER_CLROERR 1           ' Clear overflow automatically
    DEFINE HSER_SPBRG 138           ' 115200 Baud @ 64MHz, -0,08%
    
    SPBRGH = 0
    BAUDCON.3 = 1                   ' Enable 16 bit baudrate generator
    
    TRISC = %10010111
    ' RC7: USART RX
    ' RC6: USART TX
    ' RC5: ETHERNET SPI Data out (SDO/MOSI)
    ' RC4: ETHERNET SPI Data in (SDI/MISO)
    ' RC3: ETHERNET SPI clock (SCK) set to INPUT according to datasheet....
    ' RC2: N/U - currently
    ' RC2: N/U - currently
    ' RC1: N/U - currently
    
    TRISB = %11011011
    ' RB7: N/U - currently
    ' RB6: N/U - currently
    ' RB5: ETHERNET Chip select line to W5100
    ' RB4: N/U - currently
    ' RB3: N/U - currently
    ' RB2: ETHERNET Chip select line to SD-Card
    ' RB1: N/U and can not be used with the Ethernet shield
    ' RB0: ETHERNET Interrupt pin from W5100
    

[Learn More…]


Part 3

In Part Three,
He made the code of WIZnet W5100 interace routines, and he configues W5100’s network information as mac address, local ip, gateway ip, and subnet mask by this routines.And he tried to test with ping to W5100.

  • Ping Test

[Learn More…]


Part 4

In Part Four, He made the transmit & receive routine with W5100,tried to receive a HTTP request message from a Web-browser, and showed the request message on a UART terminal.

  • HTTP Request

[Learn More…]


[Goto Original Forum]


Using the Arduino Ethernet shield with AMICUS18 (Part 1~4)

by HenrikOlsson

He had very much activity on the forum of http://www.picbasic.uk, he posted it in this forum how to use the Arduino Ethernet Shield with AMICUS18 Open source hardware board based on PIC MCU.
The pisbasic made the 4 aticles with his posts.


AMICUS18 board

This board is based on PIC MCU and is compatible with Arduino Board. It is developed with Crownhill’s Proton BASIC.


Part 1

In Part One, He explains how to connect the Ethernet Shield with AMICU18 board.

  • Because AMICUS18 board has no ICSP HEADER, Ethernet shield is modified for sharing the SD card on the Ethernet shield.

[Learn More…]


Part 2

In Part Two, He explains how to define the interface for controlling UART, SPI interface, and W5100 memory map.

  • Code
    ' By default the AMICUS18 board uses the PIC18F25K20, make sure to
    ' set up MCSP or whatever IDE is being used to compile for the
    ' correct device.
    
    DEFINE OSC 64
    DEFINE LOADER_USED 1            ' We're using a bootloader.
    DEFINE HSER_RCSTA 90h           ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h           ' Enable transmit, BRGH = 1
    DEFINE HSER_CLROERR 1           ' Clear overflow automatically
    DEFINE HSER_SPBRG 138           ' 115200 Baud @ 64MHz, -0,08%
    
    SPBRGH = 0
    BAUDCON.3 = 1                   ' Enable 16 bit baudrate generator
    
    TRISC = %10010111
    ' RC7: USART RX
    ' RC6: USART TX
    ' RC5: ETHERNET SPI Data out (SDO/MOSI)
    ' RC4: ETHERNET SPI Data in (SDI/MISO)
    ' RC3: ETHERNET SPI clock (SCK) set to INPUT according to datasheet....
    ' RC2: N/U - currently
    ' RC2: N/U - currently
    ' RC1: N/U - currently
    
    TRISB = %11011011
    ' RB7: N/U - currently
    ' RB6: N/U - currently
    ' RB5: ETHERNET Chip select line to W5100
    ' RB4: N/U - currently
    ' RB3: N/U - currently
    ' RB2: ETHERNET Chip select line to SD-Card
    ' RB1: N/U and can not be used with the Ethernet shield
    ' RB0: ETHERNET Interrupt pin from W5100
    

[Learn More…]


Part 3

In Part Three,
He made the code of WIZnet W5100 interace routines, and he configues W5100’s network information as mac address, local ip, gateway ip, and subnet mask by this routines.And he tried to test with ping to W5100.

  • Ping Test

[Learn More…]


Part 4

In Part Four, He made the transmit & receive routine with W5100,tried to receive a HTTP request message from a Web-browser, and showed the request message on a UART terminal.

  • HTTP Request

[Learn More…]


[Goto Original Forum]


COMMENTS

Please Login to comment
  Subscribe  
Notify of