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 CCS Technical Support

Search found 63 matches
CCS Forum Index
Author Message
  Topic: MCP3208 driver vs SPI Library functions
nuclear__

Replies: 25
Views: 66570

PostForum: General CCS C Discussion   Posted: Tue Mar 30, 2021 12:34 pm   Subject: MCP3208 driver vs SPI Library functions
Smile
I did your suggestions.
BAUD = 100000 Did the work !

adc_io works now. Still have problem with mcp32xx but feel more confident that the problem is on settings so i can focus on that.
  Topic: MCP3208 driver vs SPI Library functions
nuclear__

Replies: 25
Views: 66570

PostForum: General CCS C Discussion   Posted: Tue Mar 30, 2021 5:25 am   Subject: MCP3208 driver vs SPI Library functions
Yes it has, i added one more just in case. The more the better. However i noticed that probes were responsible for the noise too. Adding a small ceramic on the probe itself while measuring, things wen ...
  Topic: MCP3208 driver vs SPI Library functions
nuclear__

Replies: 25
Views: 66570

PostForum: General CCS C Discussion   Posted: Mon Mar 29, 2021 12:03 pm   Subject: MCP3208 driver vs SPI Library functions
That's a LOT of noise on VDD !!!
It should be perfectly 'flat' and NOT have those 'spikes'. You need to find out what's causing them( looks like some kind of clock ?) and ELIMINATE it.

That's prob ...
  Topic: MCP3208 driver vs SPI Library functions
nuclear__

Replies: 25
Views: 66570

PostForum: General CCS C Discussion   Posted: Mon Mar 29, 2021 7:55 am   Subject: MCP3208 driver vs SPI Library functions
Yes i use hardware spi
#use SPI (MASTER, DO = PIN_c7, DI = PIN_b5, CLK = PIN_B4, BITS = 8, Mode = 0)

Here is my v supply on main board and then on mcp board. They are ground coupled.

T ...
  Topic: MCP3208 driver vs SPI Library functions
nuclear__

Replies: 25
Views: 66570

PostForum: General CCS C Discussion   Posted: Mon Mar 29, 2021 6:12 am   Subject: MCP3208 driver vs SPI Library functions
wow ! nice morning task.
Before i check it i should mention that

I was misunderstood. I use pic18f47j53. I do use lu to print int16 . I mention that the first 3 variables that i printed, was not ...
  Topic: MCP3208 driver vs SPI Library functions
nuclear__

Replies: 25
Views: 66570

PostForum: General CCS C Discussion   Posted: Sun Mar 28, 2021 3:31 pm   Subject: MCP3208 driver vs SPI Library functions
h and l are int.
It doesn't compile with lu .

actualy you can see adc1 variable which is shown with %lu and is over 255. This is the output .
I just added the rest variables in a destructive way ...
  Topic: MCP3208 driver vs SPI Library functions
nuclear__

Replies: 25
Views: 66570

PostForum: General CCS C Discussion   Posted: Sun Mar 28, 2021 12:45 pm   Subject: 3V7 operation
Hi. It's being too long since this thread was created.
I use mcp3208 with 3.7v supply (reference too).

I have an external power supply ( common ground with pic etc) and i test the digital output ...
  Topic: Compare a character of a string
nuclear__

Replies: 10
Views: 24632

PostForum: General CCS C Discussion   Posted: Thu Feb 25, 2021 3:28 am   Subject: Compare a character of a string
Ok. Since string is variable, i will get the length with strln and adjust the command.
Thanks
  Topic: Compare a character of a string
nuclear__

Replies: 10
Views: 24632

PostForum: General CCS C Discussion   Posted: Wed Feb 24, 2021 2:04 pm   Subject: Compare a character of a string
No, _much_ cleaner.

fputs(&usb_buffer

Hi again. I'm not sure whether i should open a new thread since it's a follow up.
I used this code in this form:
sprintf(usb_buffer,"%s\r&quo ...
  Topic: UART slow speed
nuclear__

Replies: 1
Views: 9197

PostForum: General CCS C Discussion   Posted: Tue Feb 09, 2021 12:54 pm   Subject: UART slow speed
Well that was probably bad use of delay,
i wrote this code to replace my delay_ms and now its super fast..

dbg_printf("\r\nbuffer1 : %u",tx_buffer_bytes());
...
  Topic: UART slow speed
nuclear__

Replies: 1
Views: 9197

PostForum: General CCS C Discussion   Posted: Tue Feb 09, 2021 11:43 am   Subject: UART slow speed
After making a big program that uses rs232, I found out that something is wrong with rs232. I realised that when i tried to send more bytes than my buffer is. I will try to print only things that matt ...
  Topic: #INCLUDE directive, variables sharing
nuclear__

Replies: 2
Views: 10613

PostForum: General CCS C Discussion   Posted: Sun Jan 17, 2021 8:20 am   Subject: #INCLUDE directive, variables sharing
thank you so much
  Topic: #INCLUDE directive, variables sharing
nuclear__

Replies: 2
Views: 10613

PostForum: General CCS C Discussion   Posted: Sun Jan 17, 2021 4:28 am   Subject: #INCLUDE directive, variables sharing
I want to figure out how to split my main.c into many files.
For example i have main.c , variables.h and functionA.h .

i use
#INCLUDE <variables.h>
in main.c , that's ok.

I want to move ...
  Topic: Compare a character of a string
nuclear__

Replies: 10
Views: 24632

PostForum: General CCS C Discussion   Posted: Fri Jan 08, 2021 11:46 am   Subject: Compare a character of a string
No i don't add null. After the fputs however, i use putc; command as many times as the characters are to be sent and they leave.
By your sayings i understand that i didn't have to use putc! I will g ...
  Topic: Compare a character of a string
nuclear__

Replies: 10
Views: 24632

PostForum: General CCS C Discussion   Posted: Fri Jan 08, 2021 8:56 am   Subject: Compare a character of a string
Shifting is for bits inside a variable. To move a string, you would have to use
strcpy, or memmove. However both would involve a lot of work.
Why move it?. Just don't copy this value out of the buff ...
 
Page 1 of 5 Goto page 1, 2, 3, 4, 5  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group