Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

interface pic12F675 with the rs232

Status
Not open for further replies.

Stefano_89

New Member
Hi, i' ve to interface the pc's rs232 to and from the pic12F675..can you help me whit the program in assembler ?? thanks..:(
 
Nigel Goodwin said:
Check my tutorials, although written mostly for the 16F628 the 12F675 uses the same 14 bit core and the code only requires very minor changes.

thanks..but.. where is the program ? :eek: :confused:
apologise me..i'm fused
 
I've done some interrupt driven half-duplex (and full-duplex) demos for 12F675, 12F683, and 16F819 (the later two are published on PICLIST)...

Here's a 9600 baud half-duplex demo for the 12F675 that you're welcome to take a peek at;

Code:
;******************************************************************
;*                                                                *
;*  Filename: 12F675 Serial Demo 3.asm                            *
;*    Author: Mike McLaren, K8LH   (k8lh_at_arrl.net)             *
;*      Date: 16-Jan-06  (last revision 30-Mar-07)                *
;*                                                                *
;*   Half Duplex Bit-Banged 9600 Baud Serial I/O Demo             *
;*    (2-Pin Version with 8-Byte Circular RX Buffer)              *
;*                                                                *
;*  ·Uses 12F675 INTOSC running at 4-MHz                          *
;*  ·Bit rate error 0.16% plus or minus 1.0% for INTOSC           *
;*  ·Bit-banged 9600 baud serial I/O                              *
;*    ·Half Duplex (should not TX and RX simultaneously)          *
;*    ·TMR0 interrupts at 104-usec intervals (every 104           *
;*     instruction cycles) and IOC (interrupt on change)          *
;*     for RX start bit leading edge detection on RXPIN           *
;*    ·Circular 8-byte RX character buffer                        *
;*    ·Inverted TX and RX signals (MAX232A or similar             *
;*     inverting RS-232 interface required)                       *
;*  ·Relatively small - the ISR and the support routines          *
;*   Init232, Put232, Get232, and PutString use 124 words         *
;*   of code space at locations 0004 through 007F and 20          *
;*   of 64 RAM locations for variables and RX buffer...           *
;*  ·Worst case 51% ISR instruction cycle 'overhead'              *
;*   (54-usecs) when a complete RX character is added to          *
;*   the circular buffer once every 1.04-msecs...                 *
;*                                                                *
;*     MPLab: 7.30    (tabs=8)                                    *
;*     MPAsm: 5.01                                                *
;*                                                                *
;******************************************************************
 

Attachments

  • 12F675 Serial Demo 3.ASM
    13.1 KB · Views: 1,095
  • DS18B20 12F675 Screen.PNG
    DS18B20 12F675 Screen.PNG
    23.7 KB · Views: 1,190
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top