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.

Super I/O for next kit, getting the most out of a single I/O pin

Status
Not open for further replies.
Hi Mike,

Sorry, I got mixed up.

I am reading the book from Tim Wilmshurst, Designing Embedded Systems with PIC Microcontrollers.

I'm trying to figure out why we need the buffer (74HCT125) for the ladybug.

Where can I read up on this?

Thanks Mike!

Regards,
Thiruselvam
 
The 74HCT125 acts as a level translator, it brings the 3.3V outputs on the ENC28J60 up to levels the ST SPI inputs can use.
If your PIC is running at 3.3V you don't need the 74HCT125
 
blueroomelectronics said:
The 74HCT125 acts as a level translator, it brings the 3.3V outputs on the ENC28J60 up to levels the ST SPI inputs can use.
If your PIC is running at 3.3V you don't need the 74HCT125

Thanks Mike! Now I get it!
 
I've been tweaking the Ladybug schematic & hand wired prototype and it's looking like it's near done. A major change yesterday was to put the LCD on a 74HC164 attached to the 10MHz SPI bus (shared with the ENC26J60 & EEPROM)
Of course if Microchip made a DIP or socketable 64pin 18F series PIC I would have avoided the glue logic, BUT it doubles as a handy SPI bus monitor as it displays every byte going out from the PIC.
The change allows just enough I/O to put the 8 relays on PORTD (via a ULN2803 of course)
**broken link removed**
 
Bill,
If you switch to 4 bit mode you can put RS on the 164 as well and free up 1 more precious I/O pin. I really just wanted a reason to post so I could call you Bill.:D

Mike.
 
Thanks Mike.
Here's the I/O map as it currently stands, I'll post the schematic(s) ASAP
Code:
Flexible I/O
Ra4     LCD_RS (use pullup)  Might swap with RC0 (no pullup when using 16F877A)
Ra5     RS485 Direction
Rb3     RX Software (pullup handy)
Rb4-7     keypad in, ICD
Rc0     TX Software
Re0     cs_enc28J60
Re1     cs_eeprom
Re2     LCD_E

Fixed I/O (set in stone)
ra0-3     opto I/O
Ra6,7     osc 9.8 or 6.25
Rb0     enc (INT0)
Rb1,2     opto in (INT1,2)
Rc1,2     opto in (CCP1,2)
Rc3-5     SPI (ENC28J60, EEPROM, LCD 74HC164)
Rc6     TX Hardware
Rc7     RX Hardware
Rd0-7     Relays 1-8
Here's the last puzzle in the design.
I would like to use as few jumper pins as possible to do the following.
I have 3 serial (TTL) devices and two UARTS (one hardware, one software)
I would like to be able to select any two serial devices (XBee, RS232, RS485) and be able to select a either UART.
As a bonus I would like to directly connect RS232 to the XBee directly)
It's easy with lots of jumpers or even a dip switch, but I'm looking for something simple.
 
Last edited:
If you have the room, please pin out the ports as much as possible so connecting off board stuff is easy. I spent last evening doing another portb mod like the one I did on Junebug, this time on the Firefly. The Firefly needs it even more than the Junebug did. Don't make me do it on the Ladybug too! :p

The Firefly mod is done, but now I have to cut a couple traces and add two jumpers to make RB2 and RB5 useable. That should be a good challenge. :D
 
Sorry futz, this one has a function in mind :) (Ethernet PLC, Relays, Inputs)
It's got lots of goodies already built in!

A future kit will be more to your liking, a PIC with LCD/Keypad & protoboard. But you'll have to wait...

PS here's the jumpers as question above...
**broken link removed**

The Ladybug will be similar in concept to the PICPLC16, but with Ethernet and optional XBee.
**broken link removed**
 
Last edited:
Well sometimes an idea hits you and here it is. I wanted the serial ports to be as flexible as I could make them (within reason)
What's available:
Xbee, RS232, RS485
and two UARTS on the PIC (One hardware, one software)

I came up with this.
**broken link removed**

You can jumper any two of the three serial sources into either the hardware or software UART on the PIC. Additionally you can bridge the XBee and RS232 port and still use the RS485 with the HW or SW UART... (you can even sneak in a listener to the bridge)
Pinout

1,4 = XBee DI (with 5V to 3V clamp)
2,5 = RS232 T1IN (MAX232)
3 = SW UART on PIC TX or RX
6,8 = HW UART on PIC TX
7 = RS485 DI

A,C = HW UART on PIC RX
B = RS485 DO
D,G = RS232 R1OUT (MAX232)
E,H = XBee DO (74HC125 buffer)
F = SW UART on PIC RX
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top