Реклама на сайте English version  DatasheetsDatasheets

KAZUS.RU - Электронный портал. Принципиальные схемы, Datasheets, Форум по электронике

Новости электроники Новости Литература, электронные книги Литература Документация, даташиты Документация Поиск даташитов (datasheets)Поиск PDF
  От производителей
Новости поставщиков
В мире электроники

  Сборник статей
Электронные книги
FAQ по электронике

  Datasheets
Поиск SMD
Он-лайн справочник

Принципиальные схемы Схемы Каталоги программ, сайтов Каталоги Общение, форум Общение Ваш аккаунтАккаунт
  Каталог схем
Избранные схемы
FAQ по электронике
  Программы
Каталог сайтов
Производители электроники
  Форумы по электронике
Помощь проекту

Proteus, KiCAD и другие ECAD Разработчик так или иначе сталкивается с системами автоматизированного проектирования. Данный раздел - по САПР.

 
Опции темы
Непрочитано 31.03.2013, 22:56  
gromovi
Заблокирован
 
Регистрация: 12.09.2009
Сообщений: 420
Сказал спасибо: 148
Сказали Спасибо 166 раз(а) в 118 сообщении(ях)
gromovi на пути к лучшему
По умолчанию usb cdc pic18f14k50

понадобился сей девайс pic18f14k50. нагуглил http://sturntech.com/blog/2010/10/21...pheral-device/
собрал в протезе - то ли проблема с дровами, то ли с головой. помогите как дрова воткнуть.
протеусовские поставил. как видно из вложения находит определяет.
Миниатюры:
Нажмите на изображение для увеличения
Название: Безымянный.gif
Просмотров: 134
Размер:	81.9 Кб
ID:	45408   Нажмите на изображение для увеличения
Название: Безымянный1.gif
Просмотров: 187
Размер:	687.2 Кб
ID:	45409  
gromovi вне форума  
Непрочитано 01.04.2013, 22:50  
gromovi
Заблокирован
 
Регистрация: 12.09.2009
Сообщений: 420
Сказал спасибо: 148
Сказали Спасибо 166 раз(а) в 118 сообщении(ях)
gromovi на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

вроде начало получатся. дрова встали. дело пошло.
gromovi вне форума  
Непрочитано 04.04.2013, 19:15  
gromovi
Заблокирован
 
Регистрация: 12.09.2009
Сообщений: 420
Сказал спасибо: 148
Сказали Спасибо 166 раз(а) в 118 сообщении(ях)
gromovi на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

кому интересно http://ww1.microchip.com/downloads/e...Doc/22288A.pdf
12Mbit
gromovi вне форума  
Непрочитано 13.04.2013, 23:21  
gromovi
Заблокирован
 
Регистрация: 12.09.2009
Сообщений: 420
Сказал спасибо: 148
Сказали Спасибо 166 раз(а) в 118 сообщении(ях)
gromovi на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

вот возник трабл. речь о "Device - CDC - Serial Emulator" на пик18ф14к50
для тех кто в теме есть "HARDWARE_PROFILE" в Microchip Solutions v2012-10-15\USB
Код:
/**************************************************  ******************
 FileName:      HardwareProfile.h
 Dependencies:  See INCLUDES section
 Processor:     PIC18, PIC24, dsPIC33, or PIC32 USB Microcontrollers
 Hardware:      This demo is natively intended to be used on Microchip USB demo
                boards supported by the MCHPFSUSB stack.  See release notes for
                support matrix.  The firmware may be modified for use on
                other USB platforms by editing this file (HardwareProfile.h)
                and adding a new hardware specific 
                HardwareProfile - [platform name].h file.
 Compiler:      Microchip C18 (for PIC18), C30 (for PIC24/dsPIC33), or C32 (for PIC32)
 Company:       Microchip Technology, Inc.

 Software License Agreement:

 The software supplied herewith by Microchip Technology Incorporated
 (the "Company") for its PIC® Microcontroller is intended and
 supplied to you, the Company's customer, for use solely and
 exclusively on Microchip PIC Microcontroller products. The
 software is owned by the Company and/or its supplier, and is
 protected under applicable copyright laws. All rights are reserved.
 Any use in violation of the foregoing restrictions may subject the
 user to criminal sanctions under applicable laws, as well as to
 civil liability for the breach of the terms and conditions of this
 license.

 THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES,
 WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
 TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
 IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
 CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.

**************************************************  ******************/

#ifndef HARDWARE_PROFILE_H
#define HARDWARE_PROFILE_H

//#define DEMO_BOARD USER_DEFINED_BOARD

#if !defined(DEMO_BOARD)
    #if defined(__C32__)
        #if defined(__32MX460F512L__)
            #if defined(PIC32MX460F512L_PIM)
                #include "HardwareProfile - PIC32MX460F512L PIM.h"
            #elif defined(PIC32_USB_STARTER_KIT)
                #include "HardwareProfile - PIC32 USB Starter Kit.h"
            #endif
        #elif defined(__32MX795F512L__)
            #if defined(PIC32MX795F512L_PIM)
                #include "HardwareProfile - PIC32MX795F512L PIM.h"
            #elif defined(PIC32_USB_STARTER_KIT)
                //PIC32 USB Starter Kit II
                #include "HardwareProfile - PIC32 USB Starter Kit.h"
            #endif
        #endif
    #endif

    #if defined(__C30__) || defined __XC16__
        #if defined(__PIC24FJ256GB110__)
            #include "HardwareProfile - PIC24FJ256GB110 PIM.h"
        #elif defined(__PIC24FJ256GB210__)
            #include "HardwareProfile - PIC24FJ256GB210 PIM.h"
        #elif defined(__PIC24FJ256GB106__)
            #include "HardwareProfile - PIC24F Starter Kit.h"
        #elif defined(__PIC24FJ64GB004__)
            #include "HardwareProfile - PIC24FJ64GB004 PIM.h"
        #elif defined(__PIC24FJ64GB502__)
            #include "HardwareProfile - PIC24FJ64GB502 Microstick.h"
        #elif defined(__PIC24FJ256DA210__)
            #include "HardwareProfile - PIC24FJ256DA210 Development Board.h"
        #elif defined(__dsPIC33EP512MU810__)
            #if defined(DSPIC33EP512MU810_PIM)
                #include "HardwareProfile - dsPIC33EP512MU810 PIM.h"
            #endif
            #if defined(DSPIC33E_USB_STARTER_KIT)
                #include "HardwareProfile - dsPIC33E USB Starter Kit.h"
            #endif
        #elif defined(__PIC24EP512GU810__)
            #if defined(PIC24EP512GU810_PIM)
                #include "HardwareProfile - PIC24EP512GU810 PIM.h"
            #endif
        #endif
    #endif

    #if defined(__18CXX)
        #if defined(__18F4550)
            #include "HardwareProfile - PICDEM FSUSB.h"
        #elif defined(__18F45K50)
            #include "HardwareProfile - PICDEM FSUSB K50.h"
        #elif defined(__18F87J50)
            #include "HardwareProfile - PIC18F87J50 PIM.h"
        #elif defined(__18F97J94)
            #include "HardwareProfile - PIC18F97J94 PIM.h"
        #elif defined(__18F87J94)
            #include "HardwareProfile - PIC18F87J94 PIM.h"
        #elif defined(__18F14K50)
            #include "HardwareProfile - LPC USB Development Kit - PIC18F14K50.h"
        /**************************************************  ******************
 FileName:      HardwareProfile.h
 Dependencies:  See INCLUDES section
 Processor:     PIC18, PIC24, dsPIC33, or PIC32 USB Microcontrollers
 Hardware:      This demo is natively intended to be used on Microchip USB demo
                boards supported by the MCHPFSUSB stack.  See release notes for
                support matrix.  The firmware may be modified for use on
                other USB platforms by editing this file (HardwareProfile.h)
                and adding a new hardware specific 
                HardwareProfile - [platform name].h file.
 Compiler:      Microchip C18 (for PIC18), C30 (for PIC24/dsPIC33), or C32 (for PIC32)
 Company:       Microchip Technology, Inc.

 Software License Agreement:

 The software supplied herewith by Microchip Technology Incorporated
 (the "Company") for its PIC® Microcontroller is intended and
 supplied to you, the Company's customer, for use solely and
 exclusively on Microchip PIC Microcontroller products. The
 software is owned by the Company and/or its supplier, and is
 protected under applicable copyright laws. All rights are reserved.
 Any use in violation of the foregoing restrictions may subject the
 user to criminal sanctions under applicable laws, as well as to
 civil liability for the breach of the terms and conditions of this
 license.

 THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES,
 WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
 TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
 IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
 CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.

**************************************************  ******************/

#ifndef HARDWARE_PROFILE_H
#define HARDWARE_PROFILE_H

//#define DEMO_BOARD USER_DEFINED_BOARD

#if !defined(DEMO_BOARD)
    #if defined(__C32__)
        #if defined(__32MX460F512L__)
            #if defined(PIC32MX460F512L_PIM)
                #include "HardwareProfile - PIC32MX460F512L PIM.h"
            #elif defined(PIC32_USB_STARTER_KIT)
                #include "HardwareProfile - PIC32 USB Starter Kit.h"
            #endif
        #elif defined(__32MX795F512L__)
            #if defined(PIC32MX795F512L_PIM)
                #include "HardwareProfile - PIC32MX795F512L PIM.h"
            #elif defined(PIC32_USB_STARTER_KIT)
                //PIC32 USB Starter Kit II
                #include "HardwareProfile - PIC32 USB Starter Kit.h"
            #endif
        #endif
    #endif

    #if defined(__C30__) || defined __XC16__
        #if defined(__PIC24FJ256GB110__)
            #include "HardwareProfile - PIC24FJ256GB110 PIM.h"
        #elif defined(__PIC24FJ256GB210__)
            #include "HardwareProfile - PIC24FJ256GB210 PIM.h"
        #elif defined(__PIC24FJ256GB106__)
            #include "HardwareProfile - PIC24F Starter Kit.h"
        #elif defined(__PIC24FJ64GB004__)
            #include "HardwareProfile - PIC24FJ64GB004 PIM.h"
        #elif defined(__PIC24FJ64GB502__)
            #include "HardwareProfile - PIC24FJ64GB502 Microstick.h"
        #elif defined(__PIC24FJ256DA210__)
            #include "HardwareProfile - PIC24FJ256DA210 Development Board.h"
        #elif defined(__dsPIC33EP512MU810__)
            #if defined(DSPIC33EP512MU810_PIM)
                #include "HardwareProfile - dsPIC33EP512MU810 PIM.h"
            #endif
            #if defined(DSPIC33E_USB_STARTER_KIT)
                #include "HardwareProfile - dsPIC33E USB Starter Kit.h"
            #endif
        #elif defined(__PIC24EP512GU810__)
            #if defined(PIC24EP512GU810_PIM)
                #include "HardwareProfile - PIC24EP512GU810 PIM.h"
            #endif
        #endif
    #endif

    #if defined(__18CXX)
        #if defined(__18F4550)
            #include "HardwareProfile - PICDEM FSUSB.h"
        #elif defined(__18F45K50)
            #include "HardwareProfile - PICDEM FSUSB K50.h"
        #elif defined(__18F87J50)
            #include "HardwareProfile - PIC18F87J50 PIM.h"
        #elif defined(__18F97J94)
            #include "HardwareProfile - PIC18F97J94 PIM.h"
        #elif defined(__18F87J94)
            #include "HardwareProfile - PIC18F87J94 PIM.h"
        #elif defined(__18F14K50)
            #include "HardwareProfile - LPC USB Development Kit - PIC18F14K50.h"
        #elif defined(__18F46J50)
            #include "HardwareProfile - PIC18F46J50 PIM.h"
        #elif defined(__18F47J53)
            #include "HardwareProfile - PIC18F47J53 PIM.h"
        #endif
    #endif

    #if defined(_PIC14E)
        #if defined (_16F1459)
    		#include "HardwareProfile - LPC USB Development Kit - PIC16F1459.h"
        #endif
    #endif
#endif

#if !defined(DEMO_BOARD)
    #error "Demo board not defined.  Either define DEMO_BOARD for a custom board or select the correct processor for the demo board."
#endif

#endif  //HARDWARE_PROFILE_H
 defined(__18F46J50)
            #include "HardwareProfile - PIC18F46J50 PIM.h"
        #elif defined(__18F47J53)
            #include "HardwareProfile - PIC18F47J53 PIM.h"
        #endif
    #endif

    #if defined(_PIC14E)
        #if defined (_16F1459)
    		#include "HardwareProfile - LPC USB Development Kit - PIC16F1459.h"
        #endif
    #endif
#endif

#if !defined(DEMO_BOARD)
    #error "Demo board not defined.  Either define DEMO_BOARD for a custom board or select the correct processor for the demo board."
#endif

#endif  //HARDWARE_PROFILE_H
я чищу код от #if приводя код под свой мк подчистил до
Код:
#ifndef HARDWARE_PROFILE_H
#define HARDWARE_PROFILE_H

//#define DEMO_BOARD USER_DEFINED_BOARD

#if !defined(DEMO_BOARD)
    #if defined(__18CXX)
        #elif defined(__18F14K50)
            #include "HardwareProfile - LPC USB Development Kit - PIC18F14K50.h"
    #endif
#endif

#if !defined(DEMO_BOARD)
    #error "Demo board not defined.  Either define DEMO_BOARD for a custom board or select the correct processor for the demo board."
#endif

#endif  //HARDWARE_PROFILE_H
получаю естественно BUILD FAILED
с "C:\Microchip Solutions v2012-10-15\USB\Device - CDC - Serial Emulator\Firmware\HardwareProfile.h:50:Error [1099] "Demo board not defined. Either define DE...тарампампам..."
вопрос где в микрочиповской версии дефайнится демо борда? USER_DEFINED_BOARD не катит.
котэ помоги

Последний раз редактировалось gromovi; 13.04.2013 в 23:39.
gromovi вне форума  
Непрочитано 14.04.2013, 00:41  
dosikus
Гуру портала
 
Аватар для dosikus
 
Регистрация: 20.11.2004
Сообщений: 10,015
Сказал спасибо: 936
Сказали Спасибо 2,269 раз(а) в 1,563 сообщении(ях)
dosikus на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

gromovi, Выключи этот хэдер и замени на
#include "HardwareProfile - LPC USB Development Kit - PIC18F14K50.h"
он там же лежит .
Заодно мануал скачай на эту борду.
Я HID проверял в протеусе . Дык даже бутлоадер работает .
Видно обновление в Programm memory ...
__________________
Осторожно , злой кот

Последний раз редактировалось dosikus; 14.04.2013 в 00:47.
dosikus вне форума  
Сказали "Спасибо" dosikus
gromovi (14.04.2013)
Непрочитано 14.04.2013, 00:42  
Driver_gv
Временная регистрация
 
Регистрация: 09.06.2006
Адрес: Lugansk
Сообщений: 75
Сказал спасибо: 0
Сказали Спасибо 26 раз(а) в 21 сообщении(ях)
Driver_gv на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

PHP код:
#define DEMO_BOARD LOW_PIN_COUNT_USB_DEVELOPMENT_KIT
    #define LOW_PIN_COUNT_USB_DEVELOPMENT_KIT
    #define CLOCK_FREQ 48000000
    #define GetSystemClock() CLOCK_FREQ 
в файле HardwareProfile - Low Pin Count USB Development Kit.h
__________________
picping.lg.ua
Driver_gv вне форума  
Сказали "Спасибо" Driver_gv
gromovi (14.04.2013)
Непрочитано 14.04.2013, 00:45  
dosikus
Гуру портала
 
Аватар для dosikus
 
Регистрация: 20.11.2004
Сообщений: 10,015
Сказал спасибо: 936
Сказали Спасибо 2,269 раз(а) в 1,563 сообщении(ях)
dosikus на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

Сообщение от gromovi Посмотреть сообщение
вроде начало получатся. дрова встали. дело пошло.
Если у тебя Win7 64 - жди беды , у меня эти дрова хорошо насрали .
Пришлось откат делать . Теперь подобные экскременты только на виртуалке.
О чем кстати и разработчики дров предупреждали ...
__________________
Осторожно , злой кот

Последний раз редактировалось dosikus; 14.04.2013 в 00:48.
dosikus вне форума  
Непрочитано 14.04.2013, 17:03  
gromovi
Заблокирован
 
Регистрация: 12.09.2009
Сообщений: 420
Сказал спасибо: 148
Сказали Спасибо 166 раз(а) в 118 сообщении(ях)
gromovi на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

Сообщение от dosikus Посмотреть сообщение
Если у тебя Win7 64 - жди беды , у меня эти дрова хорошо насрали .
Пришлось откат делать . Теперь подобные экскременты только на виртуалке.
О чем кстати и разработчики дров предупреждали ...
да беда была. проблема больше касается дебага. да хрен с ним в железе юзать буду.
gromovi вне форума  
Непрочитано 14.04.2013, 17:13  
dosikus
Гуру портала
 
Аватар для dosikus
 
Регистрация: 20.11.2004
Сообщений: 10,015
Сказал спасибо: 936
Сказали Спасибо 2,269 раз(а) в 1,563 сообщении(ях)
dosikus на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

gromovi, У меня слетели все USB примочки/дебуггеры .
Просто не опознавались системой.
__________________
Осторожно , злой кот
dosikus вне форума  
Непрочитано 21.04.2013, 15:31  
gromovi
Заблокирован
 
Регистрация: 12.09.2009
Сообщений: 420
Сказал спасибо: 148
Сказали Спасибо 166 раз(а) в 118 сообщении(ях)
gromovi на пути к лучшему
По умолчанию Re: usb cdc pic18f14k50

вернулся к вопросу. свободное время редко бывает, потому такое "затягивание". Зато есть куча времени подумать. Подумал... не надо ничего чистить. Нужно настроить модуль в режим SPI, ловить момент заполнения буфера на вход выход. Как?
PHP код:
void ProcessIO(void)
{   
    
//Blink the LEDs according to the USB device status
    
BlinkUSBStatus();
    
// User Application USB tasks
    
if((USBDeviceState ‹ CONFIGURED_STATE)||(USBSuspendControl==1)) return;

    if (
RS232_Out_Data_Rdy == 0)  // only check for new USB buffer if the old RS232 buffer is
    
{                          // empty.  This will cause additional USB packets to be NAK'd
        
LastRS232Out getsUSBUSART(RS232_Out_Data,64); //until the buffer is free.
        
if(LastRS232Out › 0)
        {    
            
RS232_Out_Data_Rdy 1;  // signal buffer full
            
RS232cp 0;  // Reset the current position
        
}
    }

    
//Check if one or more bytes are waiting in the physical UART transmit
    //queue.  If so, send it out the UART TX pin.
    
if(RS232_Out_Data_Rdy && mTxRdyUSART())
    {
        
#if defined(USB_CDC_SUPPORT_HARDWARE_FLOW_CONTROL)
            //Make sure the receiving UART device is ready to receive data before 
            //actually sending it.
            
if(UART_CTS == USB_CDC_CTS_ACTIVE_LEVEL)
            {
                
putcUSART(RS232_Out_Data[RS232cp]);
                ++
RS232cp;
                if (
RS232cp == LastRS232Out)
                    
RS232_Out_Data_Rdy 0;
            }
        
#else
            //Hardware flow control not being used.  Just send the data.
            
putcUSART(RS232_Out_Data[RS232cp]);
            ++
RS232cp;
            if (
RS232cp == LastRS232Out)
                
RS232_Out_Data_Rdy 0;        
        
#endif
    
}

    
//Check if we received a character over the physical UART, and we need
    //to buffer it up for eventual transmission to the USB host.
    
if(mDataRdyUSART() && (NextUSBOut ‹ (CDC_DATA_OUT_EP_SIZE 1)))
    {
        
USB_Out_Buffer[NextUSBOut] = getcUSART();
        ++
NextUSBOut;
        
USB_Out_Buffer[NextUSBOut] = 0;
    }
    
    
#if defined(USB_CDC_SUPPORT_HARDWARE_FLOW_CONTROL)
        //Drive RTS pin, to let UART device attached know if it is allowed to 
        //send more data or not.  If the receive buffer is almost full, we 
        //deassert RTS.
        
if(NextUSBOut ‹= (CDC_DATA_OUT_EP_SIZE 5u))
        {
            
UART_RTS USB_CDC_RTS_ACTIVE_LEVEL;
        }       
        else
        {
            
UART_RTS = (USB_CDC_RTS_ACTIVE_LEVEL 1);
        }    
    
#endif    

    //Check if any bytes are waiting in the queue to send to the USB host.
    //If any bytes are waiting, and the endpoint is available, prepare to
    //send the USB packet to the host.
    
if((USBUSARTIsTxTrfReady()) && (NextUSBOut › 0))
    {
        
putUSBUSART(&USB_Out_Buffer[0], NextUSBOut);
        
NextUSBOut 0;
    }

    
CDCTxService();

}
//end ProcessIO
void CDCTxService(void)
{
    
BYTE byte_to_send;
    
BYTE i;
    
    
USBMaskInterrupts();
    
    
CDCNotificationHandler();
    
    if(
USBHandleBusy(CDCDataInHandle)) 
    {
        
USBUnmaskInterrupts();
        return;
    }

    
/*
     * Completing stage is necessary while [ mCDCUSartTxIsBusy()==1 ].
     * By having this stage, user can always check cdc_trf_state,
     * and not having to call mCDCUsartTxIsBusy() directly.
     */
    
if(cdc_trf_state == CDC_TX_COMPLETING)
        
cdc_trf_state CDC_TX_READY;
    
    
/*
     * If CDC_TX_READY state, nothing to do, just return.
     */
    
if(cdc_trf_state == CDC_TX_READY)
    {
        
USBUnmaskInterrupts();
        return;
    }
    
    
/*
     * If CDC_TX_BUSY_ZLP state, send zero length packet
     */
    
if(cdc_trf_state == CDC_TX_BUSY_ZLP)
    {
        
CDCDataInHandle USBTxOnePacket(CDC_DATA_EP,NULL,0);
        
//CDC_DATA_BD_IN.CNT = 0;
        
cdc_trf_state CDC_TX_COMPLETING;
    }
    else if(
cdc_trf_state == CDC_TX_BUSY)
    {
        
/*
         * First, have to figure out how many byte of data to send.
         */
        
if(cdc_tx_len › sizeof(cdc_data_tx))
            
byte_to_send sizeof(cdc_data_tx);
        else
            
byte_to_send cdc_tx_len;

        
/*
         * Subtract the number of bytes just about to be sent from the total.
         */
        
cdc_tx_len cdc_tx_len byte_to_send;
          
        
pCDCDst.bRam = (BYTE*)&cdc_data_tx// Set destination pointer
        
        
byte_to_send;
        if(
cdc_mem_type == USB_EP0_ROM)            // Determine type of memory source
        
{
            while(
i)
            {
                *
pCDCDst.bRam = *pCDCSrc.bRom;
                
pCDCDst.bRam++;
                
pCDCSrc.bRom++;
                
i--;
            }
//end while(byte_to_send)
        
}
        else 
// _RAM
        
{
            while(
i)
            {
                *
pCDCDst.bRam = *pCDCSrc.bRam;
                
pCDCDst.bRam++;
                
pCDCSrc.bRam++;
                
i--;
            }
//end while(byte_to_send._word)
        
}//end if(cdc_mem_type...)
        
        /*
         * Lastly, determine if a zero length packet state is necessary.
         * See explanation in USB Specification 2.0: Section 5.8.3
         */
        
if(cdc_tx_len == 0)
        {
            if(
byte_to_send == CDC_DATA_IN_EP_SIZE)
                
cdc_trf_state CDC_TX_BUSY_ZLP;
            else
                
cdc_trf_state CDC_TX_COMPLETING;
        }
//end if(cdc_tx_len...)
        
CDCDataInHandle USBTxOnePacket(CDC_DATA_EP,(BYTE*)&cdc_data_tx,byte_to_send);

    }
//end if(cdc_tx_sate == CDC_TX_BUSY)
    
    
USBUnmaskInterrupts();
}
//end CDCTxService

#endif //USB_USE_CDC 
gromovi вне форума  
 

Закладки
Опции темы

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Программирование pic18f14k50 amirus PIC 3 31.01.2013 18:22
Программатор для PIC18F14K50 app0 Цифровые сигнальные процессоры 30 13.08.2012 14:45
Непонятный трабл PIC18F14K50 с MCLRE Xuchik Микроконтроллеры, АЦП, память и т.д 3 18.01.2012 14:26
USB CDC realid Микроконтроллеры, АЦП, память и т.д 9 08.06.2009 18:51
FT232 vs USB(в режиме cdc) Binary_Man Микроконтроллеры, АЦП, память и т.д 4 13.11.2008 16:46


Часовой пояс GMT +4, время: 23:51.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot