Interfacing PIC16F877A with serial Ethernet proto

General discussion on mikroBasic.
Post Reply
Author
Message
Sel12
Posts: 1
Joined: 18 Jun 2014 14:08

Interfacing PIC16F877A with serial Ethernet proto

#1 Post by Sel12 » 18 Jun 2014 14:44

Hi
I am connecting the p16f877a with the ethernet board (containing ENC28J60) via SPI interface, and then to the PC via an rj45 cable. I have found some C code on the internet but I am not sure how to send data ( in my project i have to send one byte according to the pressed button). The attached photo shows the microcontroller interfaced with a connecter but in real I am directly connecting it with the Ethernet board.
The example in mikroC Compiler for PIC about the SPI includes a MAX chip which I am not using.
Should I configure the SPI pins if the main in my code includes " SPI_init()"?
What else do I have to add or modify about the code?
I am TOTALLY new to this and it seems I am lost after so much research!!
Capture.JPG
Capture.JPG (40.71 KiB) Viewed 2017 times
Capture.JPG
Capture.JPG (40.71 KiB) Viewed 2017 times
Attachments
Capture (2).JPG
Capture (2).JPG (89.83 KiB) Viewed 2017 times

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: Interfacing PIC16F877A with serial Ethernet proto

#2 Post by petar.timotijevic » 20 Jun 2014 05:00

Hi,

Please see

ETH click - Example
http://www.libstock.com/projects/view/2 ... ck-example

Also please check other source code examples on Libstock web site http://www.libstock.com

Please keep in mind that PIC16F877A has 14KB flash and 368bytes of RAM!. Try to use PIC18F45K22,...


Best regards,
Peter

Post Reply

Return to “mikroBasic General”