Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I am using PIC 18 series(pic18f97j60) micro controller in my project. I am interfacing this microcontroller with DAC-ad7302. I used PORTF for D7-0 and PORTG For WR, A/B, CS, PD, CLR and LDAC.
I Wrote below code
void main() {
TRISF = 0 ; // set PORTF as output...
Yeah, Sure.
I had a problem in hardware. I didn't connect PWM to 42 Pin of pic18f97j60. The output of timer0 is 42 pin of pic18f97j60.
- - - Updated - - -
Yeah, Sure.
I had a problem in hardware. I didn't connect PWM to 42 Pin of pic18f97j60. The output of timer0 is 42 pin of pic18f97j60.
I am doing Counter0 (T0Ck1) of PIC18f97j60 and I want to read the number of pulses which inters to it.
For this purpose, I Initialized the timer0 in counter mode and I produced PWM1 (from pin ECCP1) in Mikroc Program and I connected ECCPI to T0CK1 with a wire. But when I reade TMR0L is it 130...
Thanks, Now it is better, Output changes. for input 0 and 0.7 output is 197 and 165, respectively.
I have another question?
How I can be sure that registers are fitted as I send the amount by spi?
For sending 16 bit via spi communication, It is incorrect?
PORTB.0=0 ;
Conf=0x000E;
spi((Conf & 0xFF) >> 8); // Output the MSB first
spi(Conf & 0xFF); // Followed by the LSB
PORTB.0=1 ;
PORTB.0=0 ; //Mux bit...
My code is composed of some routines. first of them is initializing Usart and introducing getchar1 and putchar1, the rest of my code is for driving AD80066..I used the disable and enable functions in main code to set ot reset configuration register...Did you work with AD80066? Would you please...
I have started to initialize AD80066. I am really interested to drive it. So I request from everyone come to discus in this thread. As described in data sheet,it has some registers that they should be configured. I connected AD80066 by SPI interface to atmega128 to fit its registers. For...
Would you please to take an example.... By applying rx interrupt, I use below code.....Please help me about details....
// USART1 Receiver interrupt service routine
interrupt [USART1_RXC] void usart1_rx_isr(void)
{
char status,data;
status=UCSR1A;
data=UDR1;
if ((status & (FRAMING_ERROR |...
I found getchar1() acts as polling it means it waits for data and it doesn't generate sck pulses...What Can I do to solve this problem?
I really need ti use getchar1() command for receive data in micro by USB?
I reduced SPI speed and tested it...then I increased the SPI speed....But the SCK pin is 1 always....It doesn't show any pulse.....
- - - Updated - - -
I found a point. It has a problem with getchar1 command. When I remove "a=getchar1();" from my code I have pulses on SCK pin.
Anybody knows why?
Thanks for your reply,
My code is attached. Would you please to take a look on it?
Thanks so much...
#include <mega128a.h>
#include <delay.h>
// SPI functions
#include <spi.h>
#define CLK1 PORTE.3
#define CLK2 PORTE.4
#define CLK PORTE.7
#ifndef RXB8
#define RXB8 1
#endif
#ifndef TXB8...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.