首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

跪求帮助:关于VDHL的一段代码

跪求帮助:关于VDHL的一段代码

本帖最后由 keledui 于 2011-1-4 11:02 编辑

下面是我编写的串行接收数据部分,但是总是调不通,我用示波器量的输入信号及时钟都是正确的,但是我按照下面的程序将数据读入CPLD的缓冲区中,然后显示出来总是不正确,但是通过data_out将接收的数据转发出去,另一端用单片机接收却能接收到,实在找不出原因,望请大侠们帮我一下,非常感谢!

非常非常感谢!

data_rx:process(sck,data_in)
begin
  if  sck'event and sck = '0' then
       data_in_buf(7 downto 0) <= data_in_buf(6 downto 0)& data_in;
  end if;
end process data_rx;

data_show:process(data_in_buf)
begin
   case data_in_buf(3 downto 0) is  --ABCDEFG
   when "0000"  => show_pin <= "1111110";--0
   when "0001"  => show_pin <= "0110000";--1
   when "0010"  => show_pin <= "1101101";--2
   when "0011"  => show_pin <= "1111001";--3
   when "0100"  => show_pin <= "0110011";--4
   when "0101"  => show_pin <= "1011011";--5
   when "0110"  => show_pin <= "1011111";--6
   when "0111"  => show_pin <= "1110000";--7
   when "1000"  => show_pin <= "1111111";--8
   when "1001"  => show_pin <= "1111011";--9
   when "1010"  => show_pin <= "1110111";--A
   when "1011"  => show_pin <= "0011111";--B
   when "1100"  => show_pin <= "1001110";--C
   when "1101"  => show_pin <= "0111101";--D
   when "1110"  => show_pin <= "1001111";--E
   when "1111"  => show_pin <= "1000111";--F
   when others  => show_pin <= "0000000";-->turn off
end case;
end process data_show;

data_out    <= data_in_buf(0); -- 发送数据赋值


我用的CPLD 为XC9572xl-10,再次感谢
本帖最后由 keledui 于 2011-1-4 09:49 编辑

请求大侠们指点一下啊~~ 非常非常感谢哦
sck是串行输入时钟,show_pin为数码管显示管脚,data_in为基于sck的数据输入
路过,,,,,,,,,
Replica NFL jerseysCheap NHL jerseysAuthentic MLB jerseysCheap Gucci handbagscheap hanel handbagscheap coach handbagsCoach handbags on sale|Coach handbags for cheapCoach handbags for womenTiger asics shoesAsics Gel Lyte III ShoesAsics Gel Nimbus ShoesMoncler kids jacketsMoncler man jacketsMoncler man shoesWomen's Classic Cardy BootsWomen's Classic Tall Bootswomen's Classic Short BootsGucci handbags wholesalegucci sunglass replicagucci belt saleCheap NFL jerseysNHL jerseys wholesaleDiscount MLB jerseysBlock machineBrick machineBrick making machineConcrete mixing plant Block making machinechanel handbagsNHL jerseys suppliersNFL jerseys suppliersNHL Jerseys ManufacturersDC hats wholesaleMonster energy hats cheapEd hardy hats saleBuy chanel lipstick onlineNew chanel lip glossNars foundation onlineApple laptopwholesaleSony laptop on saleHP Laptop wholesaleNFL jerseys wholesaleCheap nhl jerseysMLB jerseys saleWholesale true religion jeansEd hardy jeans saleA&F jeans for enChristian Louboutin Half bootsChristian Louboutin For MenChristian ouboutin BootsMoncler Fitted ufferMoncler Jackets WomenMoncler Coats WomenWedding Dresses DiscountBridal WeddingDressesCheap Wedding DressesAsics Ultimate ShoesAsics Gel Kinsei ShoesAsics Gel Stratus shoesChanel brooch replicaCheap juicy bangleChanel bracelet 2010Wholesale gucci sunglassesCheap D&G sunglassesBuy armani sunglassesCheap dc capsDC caps wholesaleDC caps offerDsquared Shoesdiscount Dsquared JeansDsquared HoodiesPuma sport shoesPuma Ferrari F1 shoesPuma Mummy shoesBuy true religion jeansdiscount true religion jeanscheap ed hardy jeansTiffany jewellery wholesaleCheap tiffany necklaceReplica tiffany necklace Moncler Womens coatsMoncler Womens jacketsMoncler Womens VesCoach handbagson saleCoach handbags forcheapCoach handbags for womenTiger asics shoesAsics Gel Lyte III ShoesAsics Gel Nimbus
Shoes
cheap nfl jerseysAuthentic nfl jerseyscustom nfl jerseysCheap Youth Nfl JerseysDiscount NFL Jerseysnfl Replica Jerseys CheapAuthentic Custom Nfl JerseysNhl Jerseys For CheapMlb Jerseys SupplierTennis Racquets wholesaleTennis Racquets saleTennis Racquets cheap Discount Nfl jerseysWholesale Nfl JerseysCustom Nfl Jerseysmbt shoes on linembt shoes on salecheap mbt shoesMbt shoes sale
返回列表