Search found 11 matches

by gritt
Tue Oct 15, 2013 6:08 pm
Forum: Flowcode V4
Topic: Internal CAN baud
Replies: 4
Views: 5264

Re: Internal CAN baud

This may be a silly question, but what difference does HS or HS-PLL make to the CAN baud? I am using HS-PLL with a 32MHz crystal and can't get any messages through above a baud of 250kbps. Because I am using HS-PLL is this calculated 250kbps actually 1Mbps?

Thanks

James
by gritt
Tue Oct 15, 2013 3:44 pm
Forum: Flowcode V4
Topic: Internal CAN baud
Replies: 4
Views: 5264

Re: Internal CAN baud

Thanks, Leigh. I'll give it a go.

James
by gritt
Tue Oct 15, 2013 12:46 pm
Forum: Flowcode V4
Topic: WS2812 Communication
Replies: 1
Views: 3321

Re: WS2812 Communication

If anyone is interested then the following code seems to work. This was borrowed from http://www.vectric.com/forum/viewtopic.php?f=3&t=17937 then modified slightly to work with my PIC. Pin B0 is connected to the data line of the WS2812 void OutputAZeroBit () { portb = 0x01; nop(); nop(); portb =...
by gritt
Tue Oct 15, 2013 12:39 pm
Forum: Flowcode V4
Topic: Internal CAN baud
Replies: 4
Views: 5264

Internal CAN baud

In the code for the macro CAN init it states that when using internal CAN, to achieve the correct baud a 20MHz crystal must be used. I need to achieve a baud of 1Mbps and am using a 32MHz crystal. I was planning on using BRGCON1 = 0x00, BRGCON2 = 0xAD and BRGCON3 = 0x02 (based on the bit timing calc...
by gritt
Mon Oct 07, 2013 1:07 pm
Forum: Flowcode V4
Topic: WS2812 Communication
Replies: 1
Views: 3321

WS2812 Communication

Has anyone tried controlling a WS2812 RGB led driver from a PIC using flowcode V4? Datasheet is here http://www.adafruit.com/datasheets/WS2812.pdf It uses a single data input line that has it's own specifically timed data format (different length of pulse for 1 and 0, at a rate of 800khz with a dela...
by gritt
Thu May 26, 2011 10:02 am
Forum: General Programming
Topic: CAN to USB Interface
Replies: 1
Views: 2401

CAN to USB Interface

Has anyone had any experience with an off the shelf CAN to USB interface? I know I could make one with flowcode but I need something quickly that will enable me to develop my CAN bus project. A quick google search turned up a CAN USB dongle from Equinox technologies <http://www.equinox-tech.com/prod...
by gritt
Tue Sep 28, 2010 7:31 pm
Forum: Flowcode V4
Topic: CAN Message Data Problem
Replies: 8
Views: 4695

Re: CAN Message Data Problem

Hi Ben, I tried adding the code you suggested throughout the macro code and got the following results. Data count is set as 8 in the send node. All 8 sent bytes are set as the same value which increments by 1 at 0.5hz up to a maximum of 8, at which point it resets to zero. This value is displayed on...
by gritt
Fri Sep 24, 2010 9:09 am
Forum: Flowcode V4
Topic: CAN Message Data Problem
Replies: 8
Views: 4695

Re: CAN Message Data Problem

Hi Ben, sorry for the long delay, I have finally got round to making the new hardware to test this application and it still does not work. I know that the tx node is sending the correct data at the correct speed as I have connected it to a pc using an NI can interface and all is ok there. The rx nod...
by gritt
Thu Aug 26, 2010 7:57 pm
Forum: Flowcode V4
Topic: CAN Message Data Problem
Replies: 8
Views: 4695

Re: CAN Message Data Problem

Hi Ben, I'm afraid it still doesn't work. Port D on the rx shows a steady 8, or if I swap tx and rx between pics it shows a steady 25, which is confusing. I'm working on some new hardware to try it on but it won't be ready until next week. Please let me know if you have any other ideas. Thanks James
by gritt
Wed Aug 25, 2010 8:24 pm
Forum: Flowcode V4
Topic: CAN Message Data Problem
Replies: 8
Views: 4695

Re: CAN Message Data Problem

Hi Ben, thanks for your help. I wrote a program for the receive node that turned on led d0 every time that the checkRx function returned a non zero value. The send node was set to send messages at a rate of 0.5Hz, and the receive node led flashed at this rate, indicating that the checkRx macro was w...
by gritt
Mon Aug 23, 2010 8:57 am
Forum: Flowcode V4
Topic: CAN Message Data Problem
Replies: 8
Views: 4695

CAN Message Data Problem

Can anyone help me with this? I am using Microchip's PICDEM CAN-LIN 2 with 2 x 18F4680 using internal CAN. I have written two files; a send node and a receive node. The send node increments a value "CAN_Message" by 1 every 500ms, ouputs it to LEDs on port D and using the CAN settxdata macr...