Browse Source

Improve port control

H. Peter Anvin 3 years ago
parent
commit
78b315f96e
2 changed files with 5 additions and 5 deletions
  1. 3 3
      USBCAS/usbcas.c
  2. 2 2
      USBCAS/usbcas.h

+ 3 - 3
USBCAS/usbcas.c

@@ -201,9 +201,9 @@ void SetupHardware(void)
 	/* Hardware Initialization */
 	USB_Init();
 
-	/* PORTB: PB0 - RXLED, PB4 - Relay, PB5 - relay out */
-	PORTB = (1 << 0) | (1 << 4);
-	DDRB  = ~(1 << 4);
+	/* PORTB: PB0 - RXLED, PB4 - Relay (pullup), PB5 - relay out */
+	PORTB |= (1 << 0) | (1 << 4);
+	DDRB  =  (DDRB & ~((1 << 4))) | ((1 << 0) | (1 << 5));
 
 	/* Initialize receiver and transmitter */
 	fmrx_init();

+ 2 - 2
USBCAS/usbcas.h

@@ -73,7 +73,7 @@ void fmrx_set_speed(uint32_t baudrate);
 void fmrx_recv_byte(uint8_t byte);
 
 /* Parameters */
-#define CAS_BAUDRATE_ABC80	720
-#define CAS_BAUDRATE_ABC800	2400
+#define CAS_BAUDRATE_ABC80	750
+#define CAS_BAUDRATE_ABC800	2600
 
 #endif