Content-Type: text/plain X-MIME-Autoconverted: from 8bit to quoted-printable by pascal.uol.com.br id HAA2 7205 I'm working on this routine. Check Microchip's site, there is something obut it(AN 510) What I'm doing in my firmware is: I send a bit. While I'm sending this bit, I start to check the RS input. After I checked, I do something else. Then, I send the next bit, and the cycle starts all over again. I'm doing w/ a 10MHz crystal, but in AN510, the firmware is for 4MHz crystal. Alejandro Lavarello wrote: > Hi Piclisters! > > I am trying to communicate a PIC16F84 running at 4MHz > to a PC, at 1200 or 2400 bauds, full duplex. > I have seen a lot of code, but only for half duplex communication. > In the Myke Predko's book "Programming and customizing > the PIC microcontroller ", he described a full duplex > communication using 3X sampling of the incoming data, > and use it in his programmer called "YAP". > Anyone could sends me the code for such kind of communication? > In my attempt, I have created a ISR called by TMR0 > and two state machines (for RX and TX), but it > spends more than 60 words only in computed gotos > (30 RX, 30 for TX) .... > Thanks in advance!! > Alejadro Lavarello > > Ahora en espa–ol > > Estoy tratando de hacer que un PIC16F84 se comunique > con un PC usando el puerto RS232, a 1200 o 2400 bauds, > full duplex. > Vi en el libro de Myke Predko que el implementa > comunicacion full duplex para su > programador de PICs llamado "YAP". > Mi pedido es si alguien podria mandarme > codigo para implementar esto. > Consegui que funcionara un programa basado > en la interrupcion generada por TMR0 cada 139usec, > (3 veces 2400 baud), esta basado en dos maquinas de > estado,(una para TX y otra RX). > Cada maquina usa una tabla de 30 posiciones, y se > realiza un salto > calculado (addwf PCL , etc.) para ir enviando y > recibiendo los bits. > El asunto es que, aunque funciona, me parece que > no es muy practico gastar unas 120 words de memoria > de programa para hacer esto. Ademas, chau interrupciones! > La unica permitida es TMR0.... > Cualquier sugerencia es bienvenida! > (O si alguien sabe si en Argentina ya se consigue el PIC16F627, > tambien seria un buen dato) > Saludos de > Alejandro Lavarello. Content-Type: text/x-vcard; charset=us-ascii; name="tavaresneto.vcf" Content-Description: Card for Roberto Fernandes T Neto Content-Disposition: attachment; filename="tavaresneto.vcf" Content-Transfer-Encoding: 7bit Attachment converted: wonderland:tavaresneto.vcf (TEXT/CSOm) (0000ED3F)