issue130:tutoriel3
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue130:tutoriel3 [2018/02/24 12:04] – créée auntiee | issue130:tutoriel3 [2018/03/05 15:16] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | In the last issue, I showed you how to dim an LED with a potentiometer. In this issue, we will read the values of the potentiometer using the analog-to-digital conversion (ADC), and send these values to a serial console. This time, we need additional hardware – a USB-to-serial adapter (it is advised not to use the serial port on your computer as damage may occur to the microcontroller because of high voltage from the computer serial port). | + | **In the last issue, I showed you how to dim an LED with a potentiometer. In this issue, we will read the values of the potentiometer using the analog-to-digital conversion (ADC), and send these values to a serial console. This time, we need additional hardware – a USB-to-serial adapter (it is advised not to use the serial port on your computer as damage may occur to the microcontroller because of high voltage from the computer serial port). |
- | Many USB-to-serial adapters will work. Common chipsets are CH340, CP210x, FTDI, PL2303, but any other chipset will work as well. Importantly, | + | Many USB-to-serial adapters will work. Common chipsets are CH340, CP210x, FTDI, PL2303, but any other chipset will work as well. Importantly, |
- | Serial communication and hardware | + | Dans le dernier numéro, je vous montrais comment faire varier la luminosité d'une LED avec un potentiomètre. Dans ce numéro, nous lirons les valeurs du potentiomètre en utilisant une conversion analogique/ |
+ | |||
+ | Beaucoup d' | ||
+ | |||
+ | **Serial communication and hardware | ||
A serial communication means that a byte of data is sent bit-by-bit through a dedicated receiving and transmitting line. See the end of this article for more basics of serial communications. | A serial communication means that a byte of data is sent bit-by-bit through a dedicated receiving and transmitting line. See the end of this article for more basics of serial communications. | ||
- | For the program flow, it is further important if the communication is blocking (the program must halt until the data is fully received or transmitted) or non-blocking (the data is buffered and the program need not halt until data is transmitted or received, then the data would be processed). Some microcontrollers have a Universal Synchronous and Asynchronous Receiver-Transmitter (USART) implemented. The ATmega328p (the one on the Arduino UNO R3) for example has a USART on PIN2 for receiving and PIN3 for sending serial data. | + | For the program flow, it is further important if the communication is blocking (the program must halt until the data is fully received or transmitted) or non-blocking (the data is buffered and the program need not halt until data is transmitted or received, then the data would be processed). Some microcontrollers have a Universal Synchronous and Asynchronous Receiver-Transmitter (USART) implemented. The ATmega328p (the one on the Arduino UNO R3) for example has a USART on PIN2 for receiving and PIN3 for sending serial data.** |
- | Great Cow BASIC has a solution to get the hardware USART to work with a few lines of code. Additionally, | + | Communication série et matériel |
+ | |||
+ | Dans une communication série, les octets de données sont envoyés bit par bit sur une ligne dédiée de réception et de transmission. Voyez en fin d' | ||
+ | |||
+ | Pour le déroulement du programme, il est important de savoir, pour la suite, si la communication est bloquante (le programme s' | ||
+ | |||
+ | **Great Cow BASIC has a solution to get the hardware USART to work with a few lines of code. Additionally, | ||
Setup the Hardware USART for Serial operations | Setup the Hardware USART for Serial operations | ||
- | An example of using the hardware USART in the ATmega328p is shown on the previous page. | + | An example of using the hardware USART in the ATmega328p is shown on the previous page.** |
+ | |||
+ | Great Cow BASIC a une solution pour faire fonctionner l' | ||
+ | |||
+ | Paramétrer l' | ||
+ | |||
+ | Un exemple de l' | ||
+ | |||
+ | **Setup for Serial operations using Software | ||
+ | |||
+ | Some microcontrollers do not have a hardware USART; which is true for the ATtiny13a I am using for these examples. Another reason could be the need of an additional serial connection without changing the microcontroller. In order to receive and send data, the serial communication could be achieved in software as well. For me, this would be quite a hard task to program, but, luckily, Great Cow BASIC has two methods for serial communication. For comparison, I will provide an example for each, and observe the differences in the two methods. Great Cow BASIC also has two methods for Serial operations using software, and these are both shown below. For simplicity, I provide the examples for sending values over the serial line. If you want to receive data, go right ahead and add the few missing lines of code.** | ||
+ | |||
+ | Paramétrer des opérations série en utilisant le logiciel | ||
+ | |||
+ | Certains microcontrôleurs n'ont pas d' | ||
- | Setup for Serial operations using Software | + | **Option 1 - ‘Legacy |
- | Some microcontrollers do not have a hardware USART; which is true for the ATtiny13a I am using for these examples. Another reason could be the need of an additional | + | This legacy method was implemented in 2007 - and is a popular method |
- | Option 1 - ‘Legacy Software Serial Method’: | + | Option 1 - « Méthode série par logiciel hérité » |
- | This legacy method was implemented in 2007 - and is a popular method for software serial operations. This method | + | Cette méthode héritée |
- | Option 2 - ‘Optimised Method’: | + | **Option 2 - ‘Optimised Method’: |
This method (bottom right) uses an additional library for Great Cow BASIC from Frank Steinberg, and is an optimised software serial driver written in portable assembler. Portable assembler means this optimised method supports AVR and PIC microcontrollers. This method provides higher baud rates (eg: an AVR clocked at 1 MHz can handle up tp 28.800 baud), and the program generated is small enough to fit on the tiny13a microcontroller. | This method (bottom right) uses an additional library for Great Cow BASIC from Frank Steinberg, and is an optimised software serial driver written in portable assembler. Portable assembler means this optimised method supports AVR and PIC microcontrollers. This method provides higher baud rates (eg: an AVR clocked at 1 MHz can handle up tp 28.800 baud), and the program generated is small enough to fit on the tiny13a microcontroller. | ||
- | If you compare the code examples, keep in mind that the ATMega328p on the Arduino comes with a 16 MHz Resonator, so the system clock is at 16 MHz. The ATtiny13a comes with a 9.6 MHz integrated systems clock; but, by default, the clock is divided (read: limited) by 8 to a mere 1.2 MHz. To change that, it would be necessary to change the fuses, which I did not want to do in this set of articles – I wanted to keep things simple. | + | If you compare the code examples, keep in mind that the ATMega328p on the Arduino comes with a 16 MHz Resonator, so the system clock is at 16 MHz. The ATtiny13a comes with a 9.6 MHz integrated systems clock; but, by default, the clock is divided (read: limited) by 8 to a mere 1.2 MHz. To change that, it would be necessary to change the fuses, which I did not want to do in this set of articles – I wanted to keep things simple.** |
- | Software prerequisites to work with the serial adapter | + | Option 2 - « Méthode optimisée » |
+ | |||
+ | Cette méthode (en bas à droite) utilise une bibliothèque complémentaire pour Great Cow BASIC, de Frank Steinberg, et c'est un pilote logiciel série optimisé écrit en assembleur portable. « Assembleur portable » signifie que cette méthode optimisée supporte les microcontrôleurs AVR et PIC. Cette méthode fournit une vitesse de transmission plus élevée (par ex., un AVR tournant à 1 MHz peut gérer jusqu' | ||
+ | |||
+ | Si vous comparez les exemples de code, gardez en tête que l' | ||
+ | |||
+ | **Software prerequisites to work with the serial adapter | ||
If you did not have to use a serial adapter, nor serial terminal software, on your computer, here are some brief explanations to get the serial communication to work. The chances are good that your computer has the necessary drivers right out-of-the-box: | If you did not have to use a serial adapter, nor serial terminal software, on your computer, here are some brief explanations to get the serial communication to work. The chances are good that your computer has the necessary drivers right out-of-the-box: | ||
Ligne 42: | Ligne 72: | ||
Now, you know the chipset of your adapter is supported (in my case it is a cp210x), and it was assigned as device ttyUSB0. Then give your Linux user the permission to use this device. Type: | Now, you know the chipset of your adapter is supported (in my case it is a cp210x), and it was assigned as device ttyUSB0. Then give your Linux user the permission to use this device. Type: | ||
+ | |||
+ | sudo chmod 666 / | ||
+ | |||
+ | Prérequis logiciels pour travailler avec un adaptateur série | ||
+ | |||
+ | Si vous ne devez utiliser ni un adaptateur série, ni du logiciel pour terminal série, sur votre ordinateur, voici quelques brèves explications pour faire fonctionner une communication série. Il y a de bonnes chances que votre ordinateur ait les pilotes nécessaires intégrés : | ||
+ | |||
+ | Branchez votre adaptateur série au port USB et tapez : | ||
+ | |||
+ | dmesg | grep tty | ||
+ | |||
+ | Vous devriez voir une ligne de ce genre : | ||
+ | |||
+ | [...] usb 6-2: cp210x converter now attached to ttyUSB0 (...convertisseur cp210x maintenant branché sur ttyUSB0) | ||
+ | |||
+ | Maintenant vous savez que le circuit de votre adaptateur est supporté (dans mon cas c'est un cp210x) et qu'il est assigné à ttyUSB0. Ensuite, donnez à votre utilisateur Linux l' | ||
sudo chmod 666 / | sudo chmod 666 / | ||
- | Give your superuser password if prompted. | + | **Give your superuser password if prompted. |
- | Then, if you do not have a serial terminal installed, I suggest putty, as it is easy to use and easily installed. A sudo apt install putty is all you need to do. Then start putty and change the serial line to / | + | Then, if you do not have a serial terminal installed, I suggest putty, as it is easy to use and easily installed. A sudo apt install putty is all you need to do. Then start putty and change the serial line to / |
- | Breadboard circuitry | + | Saisissez votre mot de passe de super-utilisateur, |
- | Compile the program and flash it to the ATtiny13a with your hardware programmer of choice. The USB-to-serial adapter should have +5V or +3V, and GND, to power up the microcontroller. Then, hook up the receiving line from the adapter to the sending PIN (PB1) of the ATtiny13a. Hook up the Poti to +5V or +3V, and GND as well, and the middle pin to the PIN ADC2 (PB4). | + | Ensuite, si aucun terminal série n'est installé, je suggère putty, car il est facile à utiliser et facilement installé. Vous n'avez qu'à faire un sudo apt install putty. Ensuite, lancez putty et modifiez la ligne série pour / |
- | Conclusion | + | **Breadboard circuitry |
- | After some experimentation, | + | Compile |
- | But, all is not lost! Serial communication on the ATtiny13a is still feasible. The optimized serial software compiled to around 368 bytes and worked like a charm. With the optimised software, we have a working solution to get serial I/O to work; even with the small program memory device like the ATtiny13a!! | + | Circuit de la plaque d' |
- | Serial communications is an important method for exchanging data. Great Cow BASIC makes the configuration and use very simple. Serial communications is easy - it is useful for debugging and to communicate key messages to the users. It can also be used for inter-microcontroller communications, albeit there are better methods like I2C and SPI. | + | Compilez le programme et flashez-le dans le ATtiny13a avec le programmeur matériel de votre choix. Pour alimenter le microcontrôleur, |
- | GitHub Repo | + | **Conclusion |
- | Evan Venn (Anobium...my mentor with respect to these articles) suggested to open a GitHub repository | + | After some experimentation, |
- | References | + | Conclusion |
- | serial communication https:// | + | Après quelques essais, il apparaît que la méthode série du logiciel hérité produit un programme trop gros - trop gros pour le ATtiny13a. Ma version de code présentée au-dessus se compile sur 1 016 octets. Pourquoi est-ce un problème ? D' |
- | Acknowledgement | + | **But, all is not lost! Serial communication on the ATtiny13a is still feasible. The optimized serial software compiled to around 368 bytes and worked like a charm. With the optimised software, we have a working solution to get serial I/O to work; even with the small program memory device like the ATtiny13a!! |
- | I wish to thank Evan Venn (Anobium) from the Great Cow BASIC Team for his insights | + | Serial communications is an important method for exchanging data. Great Cow BASIC makes the configuration and use very simple. Serial communications is easy - it is useful for debugging and to communicate key messages to the users. It can also be used for inter-microcontroller communications, |
+ | Mais tout n'est pas perdu ! La communication série avec le ATtiny13a est toujours réalisable. Le logiciel série optimisé est compilé sur environ 360 octets et fonctionne à merveille. Avec le logiciel optimisé, nous avons une solution fonctionnelle pour faire marcher les entrées/ | ||
+ | Les communications série sont une importante méthode d' | ||
+ | **GitHub Repo | ||
+ | Evan Venn (Anobium...my mentor with respect to these articles) suggested to open a GitHub repository for the source code, and, I must admit, this was a good idea. If you want to download the sources instead of copy-pasting it, you can now check it out with git or an SVN client. See https:// | ||
+ | Le dépôt Github | ||
+ | Evan Venn (Anobium... mon mentor pour ce qui concerne ces articles) me suggérait d' | ||
+ | **References | ||
+ | serial communication https:// | ||
+ | Acknowledgement | ||
- | + | I wish to thank Evan Venn (Anobium) from the Great Cow BASIC Team for his insights and valuable hints.** | |
- | Corrections | + | |
- | In the last issue a formula got lost, for completeness: | + | Références |
+ | Communications série : https:// | ||
+ | Remerciements | ||
+ | Je souhaite remercier Evan Venn (Anobium) de l' | ||
+ | |||
+ | **Corrections | ||
+ | |||
+ | In the last issue a formula got lost, for completeness: | ||
+ | |||
+ | Corrections | ||
+ | Dans l' | ||
- | Serial Comms - A Few Definitions and Notes: | + | **Serial Comms - A Few Definitions and Notes: |
by Michael Kennedy and Gord Campbell | by Michael Kennedy and Gord Campbell | ||
Ligne 100: | Ligne 164: | ||
“RS-232” (Recommended Standard 232) is a popular communications system. Originally (1960), it was used for connections with old-style telephone/ | “RS-232” (Recommended Standard 232) is a popular communications system. Originally (1960), it was used for connections with old-style telephone/ | ||
- | The simplest RS-232 implementations handle two-way communications between just two devices (say, Dev-A and Dev-B). The cabling has just three wires: ground, data pulses going from Dev-A to Dev-B, and data pulses from Dev-B to Dev-A. The cable is normally up to about 15-20 metres, but could be up to a few hundred metres, max. The hardware at both ends could be microcomputers, | + | The simplest RS-232 implementations handle two-way communications between just two devices (say, Dev-A and Dev-B). The cabling has just three wires: ground, data pulses going from Dev-A to Dev-B, and data pulses from Dev-B to Dev-A. The cable is normally up to about 15-20 metres, but could be up to a few hundred metres, max. The hardware at both ends could be microcomputers, |
- | The speed of the data-pulses must normally be set, in advance, on both devices, and must be based on how quickly both devices can transmit and receive the pulses, on the cable length and quality, the overall electrical environment, | + | Communications série - Quelques définitions et notes : |
+ | |||
+ | par Michael Kennedy et Gord Campbell | ||
+ | |||
+ | Ces notes se concentrent sur quelques fonctionnalités principales des implémentations classiques du RS-232, mais quelques autres variantes sont aussi mentionnées. Elles ont pour but de compléter l' | ||
+ | |||
+ | « RS-232 » (Recommended Standard 232 - norme recommandée n° 232) est un système de communication populaire. À l' | ||
+ | |||
+ | Les implémentations les plus simples du RS-232 gèrent des communications bidirectionnelles entre uniquement deux appareils (disons, DEV-A et Dev-B). Le câblage n'a que trois fils : une masse, des impulsions de données de Dev-A vers Dev-B, et des impulsions de données de Dev-B vers Dev-A. Le câble a normalement une longueur jusqu' | ||
+ | |||
+ | **The speed of the data-pulses must normally be set, in advance, on both devices, and must be based on how quickly both devices can transmit and receive the pulses, on the cable length and quality, the overall electrical environment, | ||
To send a single “byte” from Dev-A to Dev-B: | To send a single “byte” from Dev-A to Dev-B: | ||
Ligne 109: | Ligne 183: | ||
• Dev-A then sends the byte’s bits. Usually eight, but sometimes maybe as few as five are adequate. | • Dev-A then sends the byte’s bits. Usually eight, but sometimes maybe as few as five are adequate. | ||
• Dev-A might send a single Parity bit (Odd/ | • Dev-A might send a single Parity bit (Odd/ | ||
- | • Dev-A sends one, or one-and-half, | + | • Dev-A sends one, or one-and-half, |
+ | |||
+ | La vitesse des impulsions de données doit être pré-positionnée sur les deux dispositifs et doit être basée sur la vélocité de ces deux appareils pour émettre et recevoir des impulsions, sur la longueur et la qualité du câble, l' | ||
+ | |||
+ | Pour envoyer un seul octet de DEv-A vers Dev-B : | ||
+ | • Dev-B doit être prêt à accepter l' | ||
+ | • Dev-A émet une impulsion d'« avertissement », appelé Start-bit (bit de début), pour réveiller Dev-B ! | ||
+ | • Ensuite, Dev-A émet les bits de l' | ||
+ | • Dev-A peut envoyer un unique Parity bit (bit de parité - pair, impair, aucun). | ||
+ | • Dev-A envoie un, ou un et demi, ou deux, Stop-bits (bits d' | ||
- | So, typically, a single byte might involve the transfer of about 10-12 bits/ | + | **So, typically, a single byte might involve the transfer of about 10-12 bits/ |
UART: The above approach is termed “Asynchronous”, | UART: The above approach is termed “Asynchronous”, | ||
- | SIMPLEX/ | + | SIMPLEX/ |
- | Further, less common, variations on RS-232... | + | Ainsi, typiquement, |
+ | |||
+ | UART : l' | ||
+ | |||
+ | SIMPLEX/ | ||
+ | |||
+ | **Further, less common, variations on RS-232... | ||
USARTs: Two wires could be used to send data-bits from Dev-A to Dev-B, and two more wires for the data-bits from Dev-B to Dev-A. The second wire (of each pair) contains clock pulses - that match the data-bits on the first wire. Then, the extra Start/Stop bits may not be needed for each byte, and it may not be necessary to “lock” the two devices into matching speeds - because the clock pulses determine the widths of the data-pulses. This approach should result is slightly higher communications speeds and higher quality. The devices at both ends are termed USARTs (Universal Synchronous and Asynchronous Receiver and Transmitter); | USARTs: Two wires could be used to send data-bits from Dev-A to Dev-B, and two more wires for the data-bits from Dev-B to Dev-A. The second wire (of each pair) contains clock pulses - that match the data-bits on the first wire. Then, the extra Start/Stop bits may not be needed for each byte, and it may not be necessary to “lock” the two devices into matching speeds - because the clock pulses determine the widths of the data-pulses. This approach should result is slightly higher communications speeds and higher quality. The devices at both ends are termed USARTs (Universal Synchronous and Asynchronous Receiver and Transmitter); | ||
- | Additional Control wires: In some implementations, | + | Additional Control wires: In some implementations, |
- | RS-422, Longer cables: Slightly different devices and cabling arrangements can be adopted where longer cable runs, and/or higher speeds, are needed. The cable contains two wires for each of the data-pulses runs, and two more wires for each of the clock-pulses - like standard twisted-pair LAN cables. | + | D' |
+ | |||
+ | USART : deux fils peuvent être utilisés pour envoyer les bits de données de Dev-A à Dev-B et deux autres pour les bits de données Dev-B vers Dev-A. Le second fil de chaque paire contient des impulsions d' | ||
+ | |||
+ | Fils de contrôle additionnels : dans certaines implémentations, | ||
+ | |||
+ | **RS-422, Longer cables: Slightly different devices and cabling arrangements can be adopted where longer cable runs, and/or higher speeds, are needed. The cable contains two wires for each of the data-pulses runs, and two more wires for each of the clock-pulses - like standard twisted-pair LAN cables. | ||
RS-485, Multiple devices: Different ICs can be deployed where, for example, more than two (maybe 10, 20, 30…) devices can share the same cable(s), and, for example, all of them can talk with a single “server/ | RS-485, Multiple devices: Different ICs can be deployed where, for example, more than two (maybe 10, 20, 30…) devices can share the same cable(s), and, for example, all of them can talk with a single “server/ | ||
- | Error Handling!: If you’re writing “serial” software, and/or taming serial hardware, for private educational or entertainment purposes, then you probably won’t be over-worried if a few errors arise now-and-then. For example, if you’re sending data, serially, to a display, or controlling a few LEDs, etc, you might chose to not bother if the device is present or not, or powered on, or fully “reset” after a power-on, or ready to send/ | + | Error Handling!: If you’re writing “serial” software, and/or taming serial hardware, for private educational or entertainment purposes, then you probably won’t be over-worried if a few errors arise now-and-then. For example, if you’re sending data, serially, to a display, or controlling a few LEDs, etc, you might chose to not bother if the device is present or not, or powered on, or fully “reset” after a power-on, or ready to send/ |
+ | |||
+ | RS-422, des câbles plus longs : des dispositifs et un arrangement du câblage légèrement différents peuvent être adoptés là où de plus grandes distances de câblage et/ou de plus grandes vitesses sont nécessaires. Le câble contient deux fils pour chaque liaison d' | ||
+ | |||
+ | RS-485, des dispositifs multiples : différents CI peuvent être déployés là où, par exemple, plus de deux dispositifs (voire 10, 20, 30...) peuvent partager le(s) même(s) câble(s) et où, par exemple, ils dialoguent tous avec un dispositif « serveur/ | ||
+ | |||
+ | Gestion des erreurs ! : Si vous écrivez du logiciel « série » et/ou apprivoisez un matériel série, pour des besoins éducatifs ou ludiques, vous n' | ||
- | However, if your RS-232 app is used in an MRI/ | + | **However, if your RS-232 app is used in an MRI/ |
• Both devices would use the available control-wires to ensure that both are ready-and-willing to communicate. | • Both devices would use the available control-wires to ensure that both are ready-and-willing to communicate. | ||
• Dev-A says: “Hello, I wish to send you an alert/ | • Dev-A says: “Hello, I wish to send you an alert/ | ||
Ligne 135: | Ligne 236: | ||
• Dev-A: Here it is..... xxxxx.... | • Dev-A: Here it is..... xxxxx.... | ||
• Dev-B: Got that, 123 bytes in total, checksum=xxx, | • Dev-B: Got that, 123 bytes in total, checksum=xxx, | ||
- | • Dev-A: Excellent – thank you, over-and-out. | + | • Dev-A: Excellent – thank you, over-and-out.** |
- | At all of the above stages: | + | Cependant, si votre appli RS-232 est utilisée dans un scanner à résonance magnétique nucléaire ou un tomographe, et qu'il contrôle les doses de radiation, les positions et les moteurs, etc., et que vous êtes le malade, alors vous devrez réellement gérer toutes les conditions ci-dessus ! Ensuite, vous devrez probablement utiliser certains signaux/ |
+ | • Les deux dispositifs devront utiliser les fils de contrôle pour s' | ||
+ | • Dev-A dit : « Hello, je veux vous envoyer une alerte/ | ||
+ | • Dev-B : « Oui, envoyez-le. » | ||
+ | • Dev-A : Le voici, .... xxxxx..... | ||
+ | • Dev-B : Bien reçu, 123 octet au total, somme de contrôle = xxxx, merci. | ||
+ | • Dev-A : Excellent - merci, terminé. | ||
+ | |||
+ | **At all of the above stages: | ||
• The sender of each packet might have timeouts running, to check if the transmission choked... | • The sender of each packet might have timeouts running, to check if the transmission choked... | ||
• The receiver would have timeouts running, to ensure that the packet arrived on time, and fully... | • The receiver would have timeouts running, to ensure that the packet arrived on time, and fully... | ||
Ligne 144: | Ligne 253: | ||
• The handling of all major/ | • The handling of all major/ | ||
- | So, to ring that bell, or turn on that emergency light, or rotate that stepper motor, a single “Print.....” statement might evolve into a very complicated 500-line “LED_On()” function! | + | So, to ring that bell, or turn on that emergency light, or rotate that stepper motor, a single “Print.....” statement might evolve into a very complicated 500-line “LED_On()” function! |
- | Finally: For lots of good, general, details, see: https:// | + | À toutes les étapes précédentes : |
+ | • L' | ||
+ | • Le récepteur devrait avoir des timeouts qui tournent, pour s' | ||
+ | • Toutes les lignes de handshaking devraient être vérifiées continuellement, | ||
+ | • Si des erreurs mineures se produisent, des renvois devraient être tentés probablement, | ||
+ | • La gestion des erreurs majeures/ | ||
+ | |||
+ | Ainsi, pour sonner l' | ||
+ | |||
+ | **Finally: For lots of good, general, details, see: https:// | ||
If you’re implementing RS-232 comms on a specific device (UART, uP, CPU, etc), then look up the details in the manufacturer’s datasheets of those devices. Normally, the devices will work exactly as per the specs. However, if you’re stressing the devices, and/or writing low-level drivers, etc, you might sometimes observe “inexplicable” results. When stressed, some of these devices have nasty bugs, so you should run some web searches, and, hopefully, others will have posted explanations and suggestions. | If you’re implementing RS-232 comms on a specific device (UART, uP, CPU, etc), then look up the details in the manufacturer’s datasheets of those devices. Normally, the devices will work exactly as per the specs. However, if you’re stressing the devices, and/or writing low-level drivers, etc, you might sometimes observe “inexplicable” results. When stressed, some of these devices have nasty bugs, so you should run some web searches, and, hopefully, others will have posted explanations and suggestions. | ||
Ligne 152: | Ligne 270: | ||
Good Luck! | Good Luck! | ||
- | Michael Kennedy and Gord Campbell | + | Michael Kennedy and Gord Campbell** |
+ | |||
+ | |||
+ | Pour terminer : voyez de nombreux et bons détails généraux sur : https:// | ||
+ | |||
+ | Si vous implémentez des communications RS-232 sur un dispositif particulier (UART, uP, CPU, etc), alors regardez les détails des datasheets des constructeurs des matériels. Normalement, | ||
+ | |||
+ | Bonne chance ! | ||
+ | Michael Kennedy et Gord Campbell |
issue130/tutoriel3.1519470243.txt.gz · Dernière modification : 2018/02/24 12:04 de auntiee