Author |
Message |
Topic: v4 _fixed(x) math |
Joules
Replies: 0
Views: 2806
|
Forum: General CCS C Discussion Posted: Mon Aug 27, 2007 11:18 am Subject: v4 _fixed(x) math |
trying to port some old code that used some float math to 4.051, I was planning on using only fixed vars now.
first, when I declare the var (I know this is probably a stupid question):
signed _fi ... |
Topic: PIC18F4580 and FM25C160 |
Joules
Replies: 7
Views: 8811
|
Forum: General CCS C Discussion Posted: Fri May 19, 2006 4:14 am Subject: PIC18F4580 and FM25C160 |
oscillator is 16MHz.
I've also got an MCP4921 DAC using the SPI, that's not connected to the PICs SDI however. |
Topic: PIC18F4580 and FM25C160 |
Joules
Replies: 7
Views: 8811
|
Forum: General CCS C Discussion Posted: Thu May 18, 2006 8:37 am Subject: PIC18F4580 and FM25C160 |
Got it working; just messing around with the setup_spi() function, I added SPI_SAMPLE_AT_END and it appears to be working.
thanks again for the help. |
Topic: PIC18F4580 and FM25C160 |
Joules
Replies: 7
Views: 8811
|
Forum: General CCS C Discussion Posted: Thu May 18, 2006 8:26 am Subject: PIC18F4580 and FM25C160 |
thaks for your help, I tried SPI_MODE_0_0, no luck there, I also tried adding this:
output_high(memory_WP);
output_low(memory_CS);
spi_write(WREN);
output_high(memo ... |
Topic: PIC18F4580 and FM25C160 |
Joules
Replies: 7
Views: 8811
|
Forum: General CCS C Discussion Posted: Wed May 17, 2006 12:54 pm Subject: PIC18F4580 and FM25C160 |
/WP line is tied to a pin on the PIC which I'm holding high (maybe I've just been looking at this too long, /WP is active low and prevents writes, is that saying if it's high it allows writes?).
... |
Topic: PIC18F4580 and FM25C160 |
Joules
Replies: 7
Views: 8811
|
Forum: General CCS C Discussion Posted: Wed May 17, 2006 11:28 am Subject: PIC18F4580 and FM25C160 |
I'm trying to use the hardware SPI and the CCS spi_read() and spi_write() functions to interface with a FM25C160 FRAM.
here's what I've got:
setup_spi(SPI_MASTER | SPI_MODE_1_1 | SPI_CLK_DIV_ ... |
Topic: CAN on 18F2580 |
Joules
Replies: 4
Views: 14689
|
Forum: General CCS C Discussion Posted: Thu Mar 02, 2006 12:55 pm Subject: THANKS!!!!!!! |
PCM programmer, thanks so much!
problem was the extended ID, looks like others had the same problem, so I don't feel so stupid.
Thanks again. |
Topic: CAN on 18F2580 |
Joules
Replies: 4
Views: 14689
|
Forum: General CCS C Discussion Posted: Thu Mar 02, 2006 11:46 am Subject: CAN on 18F2580 |
That's just it, I'm not getting any error frames, it's just not receiving data. I've got the 120-ohm resistor on the 2580. When I send data from the 2580 I can receive it on the other node. The CAN tr ... |
Topic: CAN on 18F2580 |
Joules
Replies: 4
Views: 14689
|
Forum: General CCS C Discussion Posted: Thu Mar 02, 2006 11:10 am Subject: CAN on 18F2580 |
Hi, I'm new to the board.
I'm developing a system using a 18F2580 and am having no luck getting it to recieve CAN messages. I can send them just fine, and when I only have 2 nodes on the bus I do ... |
|