OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 19357|回复: 25

搞了几天的PCF8563时钟芯片。。求助。。

[复制链接]

57

主题

431

帖子

1

精华

论坛大神

Rank: 7Rank: 7Rank: 7

积分
886
金钱
886
注册时间
2011-12-25
在线时间
12 小时
发表于 2012-9-24 11:03:51 | 显示全部楼层 |阅读模式
I2C有应答,但是不管写什么数据进去,读出来都是为0。有应答,应该可以说时序没有问题吧?、不知道为什么??晶振起振了。。换了几片的8563都不行。。写数据是按手册来写的。。望搞过的大侠求求助。。
很喜爱电子行业
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

57

主题

431

帖子

1

精华

论坛大神

Rank: 7Rank: 7Rank: 7

积分
886
金钱
886
注册时间
2011-12-25
在线时间
12 小时
 楼主| 发表于 2012-9-24 11:05:39 | 显示全部楼层
网上对照了几个程序,都试过了。。原子哥的模拟I2C也试过了。。还是读出来为0,。。越简单的问题就越难。。
很喜爱电子行业
回复 支持 反对

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165540
金钱
165540
注册时间
2010-12-1
在线时间
2117 小时
发表于 2012-9-24 23:14:12 | 显示全部楼层
这个东东我同事用过,不过我没他代码...
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复 支持 反对

使用道具 举报

3

主题

47

帖子

0

精华

初级会员

Rank: 2

积分
90
金钱
90
注册时间
2012-5-17
在线时间
3 小时
发表于 2012-9-25 08:37:31 | 显示全部楼层
给你一直在用的代码

#include "CF8563.h"

// 读取时间 
uchar ReadDateTime(DATETIME  *dt)
{
  uchar xdata i, buf[7];
  
  IIC_BitStart();
  if(!IIC_SendByte(PCF8563_WR)) return 0;  // 写地址 0x02
  if(!IIC_SendByte(0x02)) return 0;
  
  IIC_BitStart();            // 写读控制字
  if(!IIC_SendByte(PCF8563_RD)) return 0;
  for(i=0; i<7; i++)
  {
      buf = IIC_RcvByte();
      if(i<7)
      {
        SDA = 0;
        IIC_Clock();
      }
      else
      {
        SDA = 1;
        IIC_Clock();
        IIC_BitStop();
      }
  }
  
  dt->year   = ((buf[6]>>4)*10) + (buf[6] & 0x0F);
  dt->month  = (((buf[5]>>4) & 0x01)*10) + (buf[5] & 0x0F);
  dt->day    = (((buf[3]>>4) & 0x03)*10) + (buf[3] & 0x0F);
  dt->hour   = (((buf[2]>>4) & 0x03)*10) + (buf[2] & 0x0F);
  dt->minute = (((buf[1]>>4) & 0x07)*10) + (buf[1] & 0x0F);
  dt->second = (((buf[0]>>4) & 0x07)*10) + (buf[0] & 0x0F);
  
  return 1;
}

// 启动时钟
uchar StartDateTime(void)
{
  uchar xdata i, buf[2];
  
  buf[0] = 0;
  buf[1] = 0;
  
  IIC_BitStart();
  if(!IIC_SendByte(PCF8563_WR)) return 0;
  if(!IIC_SendByte(0x00)) return 0;      //address
  for(i=0; i<2; i++)
  {
    if(!IIC_SendByte(buf)) return 0;
  }
  IIC_BitStop();  
  
  return 1;
}

// 设置时间
uchar SetDateTime(DATETIME *dt)
{
  uchar xdata i, buf[7];
  
  buf[0] = ((dt->second/10) << 4) + (dt->second%10);
  buf[1] = ((dt->minute/10) << 4) + (dt->minute%10);
  buf[2] = ((dt->hour/10) << 4) + (dt->hour%10);
  buf[3] = ((dt->day/10) << 4) + (dt->day%10);
  buf[4] = 1;
  buf[5] = ((dt->month/10) << 4) + (dt->month%10);
  buf[6] = ((dt->year/10) << 4) + (dt->year%10);

  IIC_BitStart();
  if(!IIC_SendByte(PCF8563_WR)) return 0;
  if(!IIC_SendByte(0x02)) return 0;      //address
  for(i=0; i<7; i++)
  {
    if(!IIC_SendByte(buf)) return 0;
  }
  IIC_BitStop();  
  
  return 1;
}

// 判断时间
bit IsDateTime(void)
{
  DATETIME xdata dt;
  ReadDateTime(&dt);
  
  if((dt.year > 99) || (dt.year < 0)) return 0;
  if((dt.month > 12) || (dt.month <= 0)) return 0;
  if((dt.day > 31) || (dt.day <= 0)) return 0;
  if((dt.hour > 23) || (dt.hour < 0)) return 0;
  if((dt.minute > 59) || (dt.minute < 0)) return 0;
  if((dt.second > 59) || (dt.second < 0)) return 0;
  
  return 1;
}
回复 支持 反对

使用道具 举报

57

主题

431

帖子

1

精华

论坛大神

Rank: 7Rank: 7Rank: 7

积分
886
金钱
886
注册时间
2011-12-25
在线时间
12 小时
 楼主| 发表于 2012-9-25 09:14:14 | 显示全部楼层
回复【4楼】mvip:
---------------------------------
谢谢。昨天已经解决了。一个低级错误搞得我3天。。不该啊。。
很喜爱电子行业
回复 支持 反对

使用道具 举报

57

主题

431

帖子

1

精华

论坛大神

Rank: 7Rank: 7Rank: 7

积分
886
金钱
886
注册时间
2011-12-25
在线时间
12 小时
 楼主| 发表于 2012-9-25 09:15:17 | 显示全部楼层
回复【4楼】mvip:
---------------------------------
问一下,,这个芯片不可以输出10ms级别的吧。。我想要输出这样的时间,难道真的要用定时器来搞。。
很喜爱电子行业
回复 支持 反对

使用道具 举报

2

主题

16

帖子

0

精华

新手上路

积分
44
金钱
44
注册时间
2014-4-5
在线时间
0 小时
发表于 2014-4-9 14:02:31 | 显示全部楼层
回复【5楼】冰是睡着的水:
---------------------------------
请问楼主是怎么解决的?我刚坐pcf8563,和你遇到的问题一样。。
BEVIS,在沉默中前行
回复 支持 反对

使用道具 举报

22

主题

110

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
295
金钱
295
注册时间
2012-11-11
在线时间
24 小时
发表于 2014-4-9 14:57:27 | 显示全部楼层
8563时间准吗,以前用过不太准,调电容也麻烦,后来不用了。
回复 支持 反对

使用道具 举报

2

主题

16

帖子

0

精华

新手上路

积分
44
金钱
44
注册时间
2014-4-5
在线时间
0 小时
发表于 2014-4-10 10:29:21 | 显示全部楼层
回复【8楼】狼烟四起:
---------------------------------
那你现在用什么时间芯片呢?谢谢。
BEVIS,在沉默中前行
回复 支持 反对

使用道具 举报

22

主题

110

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
295
金钱
295
注册时间
2012-11-11
在线时间
24 小时
发表于 2014-4-10 11:54:55 | 显示全部楼层
DS3231
回复 支持 反对

使用道具 举报

0

主题

4

帖子

0

精华

新手上路

积分
33
金钱
33
注册时间
2013-9-15
在线时间
1 小时
发表于 2014-4-10 21:14:33 | 显示全部楼层
用了 挺准的  但是没用到秒 所以秒级别的不好说。
坚持不该坚持的?放弃不该放弃的
回复 支持 反对

使用道具 举报

0

主题

1

帖子

0

精华

新手入门

积分
21
金钱
21
注册时间
2014-5-22
在线时间
0 小时
发表于 2014-5-22 08:34:29 | 显示全部楼层
你好,问题是怎样解决的,同样的问题困扰我半个月了,还没有解决。
还望赐教
回复 支持 反对

使用道具 举报

56

主题

289

帖子

0

精华

高级会员

Rank: 4

积分
865
金钱
865
注册时间
2012-11-16
在线时间
65 小时
发表于 2014-12-3 10:17:10 | 显示全部楼层
楼主 说说你问题是怎么解决的吧
回复 支持 反对

使用道具 举报

28

主题

85

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
273
金钱
273
注册时间
2015-3-23
在线时间
54 小时
发表于 2015-7-22 10:42:42 | 显示全部楼层
--贴一个VHDL程序,基本是可以用的,但是之间感觉比较快。
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity rtc is
generic(
constant CLK_RISING_CN : std_logic_vector(5 downto 0):= "010000";
constant CLK_FALING_CN : std_logic_vector(5 downto 0):= "011111";
constant CLK_DEVIDE_MAX: std_logic_vector(5 downto 0):= "011111"
);
port(
nRST    : IN  STD_LOGIC;
SYSCLK  : IN  STD_LOGIC;
rtc_int : IN  STD_LOGIC;
rtc_scl : OUT STD_LOGIC;
rtc_sda : INOUT STD_LOGIC;
poweron : IN STD_LOGIC);
end rtc;
architecture behav of rtc is 
type state2 is (idle,start,tran,recv,wait_2sck,stop);
type state1 is (idle,set_reg,set_time,read_time);
signal pstate2: state2:= idle;
signal pstate1: state1:= idle;
signal data_tran: std_logic_vector(7 downto 0):= (others => '0');
signal data_rec: std_logic_vector(7 downto 0):= (others => '0');
signal tran_en: std_logic:= '0';
signal rec_en: std_logic:= '0';
signal clk_en: std_logic:= '0';
signal stop_en: std_logic:= '0';
signal start_en: std_logic:= '0';
signal cnt_rtc_scl: std_logic_vector(4 downto 0):= (others => '0');   --cnt_rtc_scl * rtc_scl_buf
signal cnt_data: std_logic_vector(7 downto 0):= (others => '0');
signal second: std_logic_vector(5 downto 0):= (others => '0');
signal min: std_logic_vector(5 downto 0):= (others => '0');
signal hour: std_logic_vector(4 downto 0):= (others => '0');
signal days: std_logic_vector(4 downto 0):= (others => '0');
signal weekdays: std_logic_vector(2 downto 0):= (others => '0');
signal months: std_logic_vector(3 downto 0):= (others => '0');
signal years: std_logic_vector(6 downto 0):= (others => '0');
signal centurys: std_logic_vector(6 downto 0):= (others => '0');
signal alarm_min: std_logic_vector(5 downto 0):= (others => '0');
signal alarm_hour: std_logic_vector(4 downto 0):= (others => '0');
signal alarm_days: std_logic_vector(4 downto 0):= (others => '0');
signal alarm_weekdays: std_logic_vector(2 downto 0):= (others => '0');
signal cnt_sck: std_logic_vector(7 downto 0):= (others => '0');    --400KHZ
signal cnt: std_logic_vector(8 downto 0):= (others => '0');        --start mode rtc_sda falling edge is 0.3us 
signal i: std_logic_vector(3 downto 0):= (others => '0');
--variable i:integer range 0 to 127:= 0;
--variable ii:integer range 0 to 127:= 0;
signal ii: std_logic_vector(3 downto 0):= (others => '0');
signal rtc_scl_buf: std_logic:= '0';
signal rtc_sda_in: std_logic:= '0';
signal rtc_sda_out: std_logic:= '0';
signal cnt_start: std_logic_vector(5 downto 0):= (others => '0');
signal cnt_stop: std_logic_vector(5 downto 0):= (others => '0');
signal first: std_logic:= '0';
signal bit_cnt: std_logic_vector(2 downto 0):= "111";
signal cnt_wait: std_logic_vector(7 downto 0):= "00000000";
signal rtc_sda_in_buf1: std_logic:= '0';
signal rtc_sda_in_buf2: std_logic:= '0';
signal cnt_int: std_logic_vector(7 downto 0):= (others => '0');
signal rtc_int_buf: std_logic:= '0';
signal rtc_sda_en: std_logic:= '0';   -- receive word is useful
begin
rtc_scl <= rtc_scl_buf;
rtc_sda <= rtc_sda_out when tran_en = '1' or pstate2 = stop or (pstate2 = wait_2sck and rec_en = '1')else 'Z' ;   --transmit mode or stop mode
rtc_sda_in <= rtc_sda;
rtc_int_buf <= rtc_int;
cnt_int <= cnt_int + '1'when rtc_int_buf = '1' and rtc_int = '0' else cnt_int;   --falling edge
process(SYSCLK,nRST)
begin
if nRST = '0' then
data_tran <= (others => '0');
tran_en <= '0';
rec_en <= '0';
stop_en <= '0';    
start_en <= '0';
elsif rising_edge(SYSCLK) then
case pstate1 is 
when idle =>
if poweron = '0' then
--pstate1 <= set_reg;
pstate1 <= read_time;
first <= '0';
else
pstate1 <= idle;
end if;
when set_reg => 
pstate1 <= set_time;
first <= '0';   --jijun
when set_time =>
if cnt_rtc_scl = 18 and cnt_sck >= 31 then
if first = '0' then     --jijun 
first <= '1';
cnt_data <= (others => '0');
rec_en <= '0';        --receive disable
tran_en <= '1';       --transmit I2C rtc_sda enable
else
cnt_data <= cnt_data + '1';
if cnt_data >= 9 then   
cnt_data <= (others => '0');
pstate1 <= read_time;
stop_en <= '0';
first <= '0';
else 
pstate1 <= set_time;
end if;
end if;
end if;
if cnt_rtc_scl = 18 and cnt_sck >= 31 and first = '1'then
case cnt_data is 
when X"00" => 
data_tran <= X"A2";   --write
tran_en <= '1';
stop_en <= '0';
start_en <= '1';
when X"01" =>
data_tran <= X"02";   --second address
start_en <= '0';
when X"02" =>
data_tran <= X"01";   --second
when X"03" =>
data_tran <= X"01";   --min
when X"04" => 
data_tran <= X"15";   --hour
when X"05" =>
data_tran <= X"11";   --days
when X"06" =>
data_tran <= X"05";   --weekdays
when X"07" => 
data_tran <= X"07";   --months
when X"08" => 
data_tran <= X"0f";   --years
-- when X"09" =>
-- data_tran <= X"1d";   --alarm_min = 59 ; enable minute alarm
  if pstate2 = stop then 
stop_en <= '0';
cnt_data <= cnt_data + '1';
tran_en <= '0';
else 
stop_en <= '1';       --stop mode
end if;
when others => 
stop_en <= '0';
start_en <= '0';
end case;
elsif pstate2 = stop then 
stop_en <= '0';
end if;
when read_time => 
if cnt_rtc_scl = 18 and cnt_sck >= 31 then
if first = '0' then     --base
first <= '1';
cnt_data <= (others => '0');
rec_en <= '1';        --receive disable
tran_en <= '0';       --transmit I2C rtc_sda enable
else
cnt_data <= cnt_data + '1';
if cnt_data >= 13 then   
cnt_data <= (others => '0');
pstate1 <= idle;
stop_en <= '0';
else 
pstate1 <= read_time;
end if;
end if;
end if;

-- if cnt_rtc_scl = 18 and cnt_sck >= 31 then   --18
-- cnt_data <= cnt_data + '1';
-- end if;
-- if cnt_data >= 12 then
-- if cnt_rtc_scl = 18 then     --useful next byte
-- cnt_data <= (others => '0');
-- pstate1 <= idle;
-- stop_en <= '0';
-- end if;
-- else 
-- pstate1 <= read_time;
-- end if;
if cnt_rtc_scl = 18 and cnt_sck >= 31 and first = '1'then
case cnt_data is 
when X"00" => 
data_tran <= X"A2";   --write 
start_en <= '1';
tran_en <= '1'; 
rec_en <= '0';
when X"01" =>
data_tran <= X"02";   --second address
start_en <= '0';
when X"02" =>
data_tran <= X"A3";   --read
start_en <= '1';
tran_en <= '1';
when X"03" =>
start_en <= '0';
tran_en <= '0';
rec_en <= '1';
when X"04" => 
--second <= data_rec(5 downto 0);     --test
when X"05" => 
--second <= data_rec(5 downto 0);     --test
when X"06" =>
--second <= data_rec(5 downto 0);
when X"07" =>
--min <= data_rec(5 downto 0);
when X"08" =>
--hour <= data_rec(4 downto 0);   --02H
when X"09" =>
--days <= data_rec(4 downto 0);
when X"0a" =>
--weekdays <= data_rec(2 downto 0);
when X"0b" => 
--months <= data_rec(3 downto 0);
when X"0c" =>
--years <= data_rec(6 downto 0);
if pstate2 = stop then 
stop_en <= '0';
-- if cnt_rtc_scl = 18 then     --useful next byte
cnt_data <= cnt_data + '1';
-- end if;
else 
   stop_en <= '1';       --stop mode
end if;
rec_en <= '0';
when others => 
stop_en <= '0';
end case;
elsif pstate2 = stop then 
stop_en <= '0';
end if;
if rtc_sda_en = '1' then 
case cnt_data is 
when X"04" => 
--second <= data_rec(5 downto 0);     --test
when X"05" => 
--second <= data_rec(5 downto 0);     --test
when X"06" =>
second <= data_rec(5 downto 0);
when X"07" =>
min <= data_rec(5 downto 0);
when X"08" =>
hour <= data_rec(4 downto 0);   --02H
when X"09" =>
days <= data_rec(4 downto 0);
when X"0a" =>
weekdays <= data_rec(2 downto 0);
when X"0b" => 
months <= data_rec(3 downto 0);
when X"0c" =>
years <= data_rec(6 downto 0);
when others =>
alarm_min <= data_rec(5 downto 0);    --test 
end case;
end if;
when others =>
pstate1 <= idle;
end case;
end if;
end process;
process(SYSCLK,nRST)     --generate rtc_sda
begin
if nRST = '0' then
cnt_start <= (others => '0');
cnt_stop <= (others => '0');
i <= (others => '0');
bit_cnt <= "111";
rtc_sda_en <= '0';
elsif rising_edge(SYSCLK) then 
rtc_sda_in_buf1 <= rtc_sda_in;
rtc_sda_in_buf2 <= rtc_sda_in_buf1;
case pstate2 is 
when idle =>
if start_en = '1' then
if rtc_scl_buf = '0' then    --Time interval can't be too long from start to tran
pstate2 <= start;
else
pstate2 <= idle;
end if;
elsif stop_en = '1' then
pstate2 <= stop;
end if;
when start =>      --falling edge
clk_en <= '0';
if rtc_scl_buf = '1' then 
cnt_start <= cnt_start + '1';
if cnt_start < 16 then
rtc_sda_out <= '1';
elsif cnt_start < 31 then
rtc_sda_out <= '0';
elsif cnt_start = 31 then 
if tran_en = '1' then
pstate2 <= tran;
elsif rec_en = '1' then
pstate2 <= recv;
end if;
cnt_start <= (others => '0');
i <= (others => '0');
end if;
end if;
when tran =>
clk_en <= '1';
if rtc_scl_buf = '0' and cnt_sck = 16 then  --the mid of low level
bit_cnt <= bit_cnt - '1';
rtc_sda_out <= data_tran(conv_integer(bit_cnt));
if bit_cnt = "000" then
pstate2 <= wait_2sck;
end if;
else 
pstate2 <= tran;
end if;
when wait_2sck =>
clk_en <= '1';
if cnt_wait = 62 then
if rec_en = '1' then
rtc_sda_out <= '0';   --acknowledge of master 
rtc_sda_en <= '1';
-- elsif tran_en = '1' then    --why why 
-- rtc_sda_out <= 'Z';
-- else   
-- rtc_sda_out <= '1';
end if;
end if;
if cnt_wait = 124 then
if stop_en = '1' then 
pstate2 <= stop;
elsif start_en = '1' then 
pstate2 <= start;
elsif tran_en = '1' then
pstate2 <= tran;
elsif rec_en = '1' then
pstate2 <= recv;
rtc_sda_en <= '0';
end if;
cnt_wait <= (others => '0');
else 
pstate2 <= wait_2sck;
cnt_wait <= cnt_wait + '1';
end if;
when recv => 
clk_en <= '1';
if rtc_scl_buf = '1' and cnt_sck = 16  then  -- the mid of high level
bit_cnt <= bit_cnt - '1';
data_rec(conv_integer(bit_cnt)) <= rtc_sda_in_buf2;
if bit_cnt = "000" then 
pstate2 <= wait_2sck;
end if;
end if;
when stop =>      --rising edge
if rtc_scl_buf = '1' then
cnt_start <= cnt_start + '1';
if cnt_start < 16 then 
clk_en <= '0';
rtc_sda_out <= '0';
elsif cnt_start < 31 then
rtc_sda_out <= '1';
elsif cnt_start = 31 then 
pstate2 <= idle;
clk_en <= '1';
--pstate2 <= recv;
cnt_start <= (others => '0');
end if;
end if;
when others =>
pstate2 <= idle;
end case;
end if;
end process;

process(SYSCLK,nRST)
begin
if nRST = '0' then   
rtc_scl_buf <= '1';
cnt_sck <= (others => '0');
cnt_rtc_scl <= (others => '0');
elsif rising_edge(SYSCLK) then
--if clk_en = '1' then
if cnt_sck >= 31 then
rtc_scl_buf <= not rtc_scl_buf;
cnt_sck <= (others => '0');
if cnt_rtc_scl >= 18 then 
cnt_rtc_scl <= (others => '0');
else 
cnt_rtc_scl <= cnt_rtc_scl + '1';
end if;
else
rtc_scl_buf <= rtc_scl_buf;
cnt_sck <= cnt_sck + '1';
end if;
--else
-- rtc_scl_buf <= '1';
-- cnt_sck <= (others => '0');
--end if;
end if;
end process;

-- if div_cnt = CLK_DEVIDE_MAX then
-- div_cnt <= (others => '0');
-- bit_cnt <= bit_cnt - '1';
-- if bit_cnt = "000" then
-- pstate <= wait_2sck;
-- end if;                   
-- else
-- div_cnt <= div_cnt + '1';
-- end if;
-- if (div_cnt = CLK_RISING_CN) then
-- rtc_scl_buf <= '1';                    
-- elsif (div_cnt = CLK_FALING_CN) then
-- rtc_scl_buf <= '0';
-- end if;     
end architecture;
回复 支持 反对

使用道具 举报

0

主题

1

帖子

0

精华

新手入门

积分
8
金钱
8
注册时间
2016-4-8
在线时间
0 小时
发表于 2016-4-8 10:01:24 | 显示全部楼层
请问楼主,最后问题是如何解决的,现在我也遇到同样的问题了,
回复 支持 反对

使用道具 举报

2

主题

21

帖子

0

精华

新手上路

积分
46
金钱
46
注册时间
2016-4-8
在线时间
11 小时
发表于 2016-4-8 15:52:09 | 显示全部楼层
估计是硬件问题
回复 支持 反对

使用道具 举报

9

主题

80

帖子

0

精华

初级会员

Rank: 2

积分
192
金钱
192
注册时间
2015-2-9
在线时间
51 小时
发表于 2016-4-8 20:53:07 来自手机 | 显示全部楼层
鄙视这种只求回报 不愿意付出的
回复 支持 反对

使用道具 举报

9

主题

85

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
3894
金钱
3894
注册时间
2014-7-26
在线时间
539 小时
发表于 2017-7-3 19:45:53 | 显示全部楼层
我也遇到同样的问题,显示00。设置后也没用。
回复 支持 反对

使用道具 举报

3

主题

9

帖子

0

精华

新手上路

积分
41
金钱
41
注册时间
2018-11-19
在线时间
9 小时
发表于 2018-12-6 18:14:25 来自手机 | 显示全部楼层
看一下手册,显示00有可能是因为晶振没有,或者是配置的时钟模式时,把时钟停止了,所以才会一直显示00
回复 支持 反对

使用道具 举报

2

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
92
金钱
92
注册时间
2014-1-6
在线时间
13 小时
发表于 2019-9-16 16:26:39 | 显示全部楼层
怎么解决的?那么多朋友看你的帖子,帮你想办法,最后解决了,也不吱一声。:@
最热情的问候 With My Warmest Regards
回复 支持 反对

使用道具 举报

23

主题

292

帖子

0

精华

高级会员

Rank: 4

积分
501
金钱
501
注册时间
2013-9-17
在线时间
17 小时
发表于 2019-12-9 00:59:25 | 显示全部楼层
Lord袁 发表于 2019-9-16 16:26
怎么解决的?那么多朋友看你的帖子,帮你想办法,最后解决了,也不吱一声。

大部分写贴求助的,最后都这个样。
闷鱼闷闷不乐吃焖鱼
回复 支持 反对

使用道具 举报

23

主题

292

帖子

0

精华

高级会员

Rank: 4

积分
501
金钱
501
注册时间
2013-9-17
在线时间
17 小时
发表于 2019-12-9 01:00:04 | 显示全部楼层
大部分写贴求助的,最后都这个样。
闷鱼闷闷不乐吃焖鱼
回复 支持 反对

使用道具 举报

1

主题

6

帖子

0

精华

新手上路

积分
22
金钱
22
注册时间
2019-8-11
在线时间
4 小时
发表于 2019-12-9 20:04:40 | 显示全部楼层
首先强烈鄙视这种只知索取不知回报的行为。
我以前用过8563,我想原因可能有:
1. 初始化不成功,要用示波器抓一下晶振波形;
2. SDA设置输出低后,没有释放;
3. IIC上没有加上拉电阻或者上拉电阻太大;
我用的是GPIO模拟IIC

欢迎各位大神补充
回复 支持 反对

使用道具 举报

2

主题

15

帖子

0

精华

初级会员

Rank: 2

积分
185
金钱
185
注册时间
2019-2-25
在线时间
52 小时
发表于 2020-11-21 00:12:35 | 显示全部楼层
“谢谢。昨天已经解决了。一个低级错误搞得我3天。。不该啊。。”
就不能说一下最后是怎么解决的么!
回复 支持 反对

使用道具 举报

0

主题

3

帖子

0

精华

新手上路

积分
33
金钱
33
注册时间
2020-7-9
在线时间
8 小时
发表于 2020-11-24 14:23:33 | 显示全部楼层
我也遇到同样的情况,顺便问下这个芯片上接上晶振后上电就起震吗?我正在查问题呢。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-23 09:57

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表