CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

MAC Level Filters 18F87J60

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dprocter



Joined: 01 Jul 2009
Posts: 5

View user's profile Send private message

MAC Level Filters 18F87J60
PostPosted: Mon Jul 06, 2009 2:14 am     Reply with quote

I'm having a few Ethernet problems, which I have managed to localise down to multicast/broadcast messages filling up the tiny buffer on the PIC. This is making Unicast impossible, which is all I need.

After a look in the datasheet I found the ERXFCON (receive filter) register, but I can't seem to get it to work. I should be able to only allow Unicast messages through, setting it to 0xE0 (1110 0000).

Does anybody have any experience with this register, and/or any advice?

Thanks
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Jul 06, 2009 5:25 am     Reply with quote

You are looking in the right place. Here is an example that will not accept multicast

Code:

   // The default enables unicast and broadcast
   WriteReg(ERXFCON, ERXFCON_UCEN | ERXFCON_CRCEN | ERXFCON_HTEN | ERXFCON_BCEN);

_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
dprocter



Joined: 01 Jul 2009
Posts: 5

View user's profile Send private message

PostPosted: Mon Jul 06, 2009 9:16 am     Reply with quote

asmallri wrote:

Code:

   // The default enables unicast and broadcast
   WriteReg(ERXFCON, ERXFCON_UCEN | ERXFCON_CRCEN | ERXFCON_HTEN | ERXFCON_BCEN);


Yea, I tried that, but it doesnt seem to let anything through. I cant even ping my device with that set!

Also, im using the Brush Electronics bootloader, which enables the unicast and broadcast by default.

Code:
movlw   M_ERXFCON_UCEN | M_ERXFCON_CRCEN |  M_ERXFCON_BCEN | M_ERXFCON_MCEN
movwf   ERXFCON


This will always happen before my code initialises, so im wondering if that could be affecting the ability for my code resetting it to 0xE0 (unicast and CRC).
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group