This is a multi-part message in MIME format. --------------7EC734238BF56B6934ECD107 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm trying to simply poll the RS232 RCV pin in oder to detect incoming characters and upon doing so store the character in a buffer to be displayed to the terminal at a later point in time. I should explain that i know this can be easily done using the hardware usart of the PIC with the use of interrupts but for my current project, i need 2 serial ports on one PIC hence my trying to achieve this in software. i'm using PIN_B0 as the RS232 Rcv pin. That's because it has an external interrupt. So i should get an INT_EXT interrupt whenever a new character comes in. the problem is that for some reason, my INT_EXT routine never gets called! :( i have checked everything to the best of knowledge and everyhting seems to be configured/wired up correctly. I have also gone over the code several times and can't see anything wrong with the code so what am i missing? weird thing is that it's xmitting fine! it's just the rcving giving me a head ache! pls find my code attached. BTW, i'm working with PIC16C73A. any ideas please? seyi --------------7EC734238BF56B6934ECD107 Content-Type: application/x-unknown-content-type-C_auto_file; name="Sw_usart.c" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="Sw_usart.c" I2luY2x1ZGUgPFBJQzE2QzczQS5IPg0KI2Z1c2VzICBYVCxOT1dEVCxOT1BST1RFQ1QNCg0K I3VzZSByczIzMihiYXVkPTEyMDAsYml0cz04LHBhcml0eT1OLHhtaXQ9UElOX0IxLHJjdj1Q SU5fQjApIC8vIHMvdyB1YXJ0DQovLyN1c2UgcnMyMzIoYmF1ZD0xMjAwLGJpdHM9OCxwYXJp dHk9Tix4bWl0PVBJTl9DNixyY3Y9UElOX0M3KSAvLyBoL3cgdWFydA0KDQojZGVmaW5lIEJV RkZFUl9TSVpFIDMyDQoNCi8vIExFRFMNCiNkZWZpbmUgUkNWX0xFRCBQSU5fQjINCiNkZWZp bmUgWE1JVF9MRUQgUElOX0IzDQojZGVmaW5lIExFRDMgUElOX0I0DQojZGVmaW5lIExFRDQg UElOX0I1DQoNCi8vIEdMT0JBTCBWQVJJQUJMRVMNCmJ5dGUgYnVmZmVyW0JVRkZFUl9TSVpF XTsNCmJ5dGUgbmV4dF9pbjsNCmJ5dGU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ZXJydXB0cyhHTE9CQUwpOw0KDQogICBwcmludGYoIlxyXG5cUnVu bmluZy4uLlxyXG4iKTsNCg0KICAgICAgICAgICAgICAgLy8gVGhlIHByb2dyYW0gd2lsbCBk ZWxheSBmb3IgMTAgc2Vjb25kcyBhbmQgdGhlbiBkaXNwbGF5DQogICAgICAgICAgICAgICAv LyBhbnkgZGF0YSB0aGF0IGNhbWUgaW4gZHVyaW5nIHRoZSAxMCBzZWNvbmQgZGVsYXkNCg0K ICAgZG8gew0KICAgICAgaW5pdGlhbGlzZSgpOw0KICAgICAgcHJpbnRmKCJcclxuRW50ZXIg ZGF0YSA9PiAiKTsNCiAgICAgIGRlbGF5X21zKDEwMDApOw0KICAgICAgcHJpbnRmKCJcclxu QnVmZmVyZWQgZGF0YSA9PiAiKTsNCiAgICAgIHdoaWxlIChuZXh0X291dCA8PSBuZXh0X2lu KQ0KICAgICAgICBwdXRjKCBiZ2V0YygpICk7DQogICB9IHdoaWxlIChUUlVFKTsNCn0NCg== --------------7EC734238BF56B6934ECD107-- -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics