I am trying to modify the CCS example one wire interface to communciate between pics. The pics being used are the pic24f16a101.
The one wire will be connected to the rx uart on both pics. Unfortunately the pin selection is fixed as the hardware is already created.
If possible I might make use of the rx uart however I will start out with the bit bashed software version to get something working. My problem is that I am not connecting to the external interrupt pin on the pics.
I am not sure if I can easily modify the code to configure the pin to:
- receive a interrupt and fix the ISR accordingly to sense a change in level on the pin
- receive the corresponding data in software (or hardware using the rx uart hardware) on the rx uart pin
- transmit on on the same pin
I am guessing all of this is possible but I just have to write more clever C to deal with the change in configuration.
Any help would be much appreciated!!
Cheers
Mike
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
Posted: Fri Aug 07, 2009 6:33 am
Quote:
The one wire will be connected to the rx uart on both pics
There are two UARTs on 24F16KA101.
The most critical function that is needed for one wire slave is to react in time on input change, particularly falling edge. You need an interrupt to achieve this.
Because the said chip can configure the input change interrupt to arbitrary pins, you have an easy solution.
In my opinion, a bidirectional "one wire" UART protocol would work faster and with less effort on the said pins.
mikem
Joined: 09 Jul 2009 Posts: 11
Posted: Mon Aug 10, 2009 2:01 am
Hi FVM,
Thanks for your feedback. I agree that just using a bit bashed software implementation for the one wire interface is probably easiest.
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