Author |
Message |
Topic: Help this newbie in using digital potentiometer with LM386 |
sradhika1998
Replies: 13
Views: 25565
|
Forum: General CCS C Discussion Posted: Sun Jun 30, 2019 10:53 pm Subject: Help this newbie in using digital potentiometer with LM386 |
Sorry, can't help, your link did not work, (tried it twice).
Read the posts at the head of the general discussion.
The advice there is to dispense with ISIS/Proteus.
It simply does not work w ... |
Topic: Help this newbie in using digital potentiometer with LM386 |
sradhika1998
Replies: 13
Views: 25565
|
Forum: General CCS C Discussion Posted: Sun Jun 30, 2019 10:33 pm Subject: Help this newbie in using digital potentiometer with LM386 |
I tried as well, but can not download any of your files.
'Distorted' sound could be wrong gain for the LM386, wrong components, wrong power supply.
I suggest eliminating the PIC portion, take the LI ... |
Topic: Help this newbie in using digital potentiometer with LM386 |
sradhika1998
Replies: 13
Views: 25565
|
Forum: General CCS C Discussion Posted: Sun Jun 30, 2019 10:15 pm Subject: Help this newbie in using digital potentiometer with LM386 |
The MCP4131 data sheet says it uses SPI mode 00 or 11 (i.e., mode 0 or 3).
Your code is using SPI mode 2. That's wrong.
See this chart by ckielstra to see the SPI mode:
http://www.ccsinfo.com/fo ... |
Topic: Help this newbie in using digital potentiometer with LM386 |
sradhika1998
Replies: 13
Views: 25565
|
Forum: General CCS C Discussion Posted: Sun Jun 30, 2019 2:06 pm Subject: Help this newbie in using digital potentiometer with LM386 |
Hello,
I am newbie at CCS programming. I am designing speaker with digital potentiometer. The amplifier is LM386 and digital potentiometer is MCP4131 (100k). I am using PIC18F4520 microcontroller a ... |
Topic: SSD1306 OLED menu interfacing with button and LED using PIC |
sradhika1998
Replies: 21
Views: 39893
|
Forum: General CCS C Discussion Posted: Mon Jun 24, 2019 2:33 am Subject: SSD1306 OLED menu interfacing with button and LED using PIC |
If I just go with m2==2 then program get confuse with which menu it will go with, either ABC, DEF or GHI
Guide me what syntax do I use in it..
Awaiting your response.
You are the one confused, ... |
Topic: SSD1306 OLED menu interfacing with button and LED using PIC |
sradhika1998
Replies: 21
Views: 39893
|
Forum: General CCS C Discussion Posted: Sat Jun 22, 2019 10:29 pm Subject: SSD1306 OLED menu interfacing with button and LED using PIC |
Stop doing this:
output_low(PIN_B0)==0;
output_low(PIN_B1)==0;
output_high(PIN_B2)==1;
There is no equality test on output_high() or output_low().
Do it like this ... |
Topic: SSD1306 OLED menu interfacing with button and LED using PIC |
sradhika1998
Replies: 21
Views: 39893
|
Forum: General CCS C Discussion Posted: Sat Jun 22, 2019 8:30 am Subject: SSD1306 OLED menu interfacing with button and LED using PIC |
How do you expect it will ever enter the case statement.
if (m2==1 && row_Ind == 1 && button_select==0){
if( m2==2)
I don't know how do I frame this loop.
m2= ... |
Topic: SSD1306 OLED menu interfacing with button and LED using PIC |
sradhika1998
Replies: 21
Views: 39893
|
Forum: General CCS C Discussion Posted: Sat Jun 22, 2019 8:09 am Subject: SSD1306 OLED menu interfacing with button and LED using PIC |
You should add a small cap across the switch. I use .68 mfd as I have a reel of them,probably 4500+ left on it. .1 mfd, .22 mfd, .05mfd make work as well.
The cap will reduce if not eliminate 'contac ... |
Topic: SSD1306 OLED menu interfacing with button and LED using PIC |
sradhika1998
Replies: 21
Views: 39893
|
Forum: General CCS C Discussion Posted: Sat Jun 22, 2019 4:07 am Subject: SSD1306 OLED menu interfacing with button and LED using PIC |
Your buttons are connected incorrectly. Do it like this for each switch:
+5v
|
<
> 4.7K
< ___ Push butto ... |
Topic: SSD1306 OLED menu interfacing with button and LED using PIC |
sradhika1998
Replies: 21
Views: 39893
|
Forum: General CCS C Discussion Posted: Sat Jun 22, 2019 2:50 am Subject: SSD1306 OLED menu interfacing with button and LED using PIC |
You really need to think/explain what you are actually trying to do?.
output_low(PIN_xx);
sets an output pin low.
If a pin is being used as an output, it can't at the same time be an input.
... |
Topic: SSD1306 OLED menu interfacing with button and LED using PIC |
sradhika1998
Replies: 21
Views: 39893
|
Forum: General CCS C Discussion Posted: Fri Jun 21, 2019 10:15 am Subject: Re: SSD1306 OLED menu interfacing with button and LED using |
The output_low() function doesn't return a value. Maybe you really
want to use input_state() ? But output_low() in an if() statement will
not work.
hello I made some changes in it,
... |
Topic: SSD1306 OLED menu interfacing with button and LED using PIC |
sradhika1998
Replies: 21
Views: 39893
|
Forum: General CCS C Discussion Posted: Fri Jun 21, 2019 8:32 am Subject: SSD1306 OLED menu interfacing with button and LED using PIC |
Hello,
I have built a menu code, and this little code is part of big code. I am interfacing transistor in place of LED as shown in picture. But just for practical results i am using LED here.
voi ... |
|