Skip to content

Commit

Permalink
Bug fixes, updated to v1.4
Browse files Browse the repository at this point in the history
Fixed (inverted) rec pause output in FW, fix for camera detection on higher (>14 V) input voltages, made blinking speeds more distinctive, fixed LED connection markings for PCB, updated README
  • Loading branch information
Fagear committed Dec 10, 2024
1 parent ae314e6 commit 6428da6
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 47 deletions.
Binary file modified 14P-10P.lay6
Binary file not shown.
18 changes: 11 additions & 7 deletions Beta10Pin/beta10p.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const uint8_t ucaf_adc_to_byte[1024] PROGMEM =


// Firmware description strings.
volatile const uint8_t ucaf_version[] PROGMEM = "v1.3"; // Firmware version
volatile const uint8_t ucaf_version[] PROGMEM = "v1.4"; // Firmware version
volatile const uint8_t ucaf_compile_time[] PROGMEM = __TIME__; // Time of compilation
volatile const uint8_t ucaf_compile_date[] PROGMEM = __DATE__; // Date of compilation
volatile const uint8_t ucaf_info[] PROGMEM = "Sony Beta camera 14-pin to 10-pin EIAJ adapter"; // Firmware description
Expand Down Expand Up @@ -472,7 +472,7 @@ static inline void delay_management(void)
if(u8_vid_dir_dly!=0) u8_vid_dir_dly--;
if(u8_rec_trg_dly!=0) u8_rec_trg_dly--;
if(u8_rr_dly!=0) u8_rr_dly--;
#ifdef EN_SERIAL
#ifdef EN_SERIAL
// Serial command timeout.
if(u8_ser_cmd_dly!=0)
{
Expand All @@ -493,18 +493,17 @@ static inline void delay_management(void)
// No serial activity.
u8i_interrupts &= ~INTR_SERIAL;
}

#endif /* EN_SERIAL */
#endif /* EN_SERIAL */
}

//-------------------------------------- Process slow delays.
static inline void slow_state_timing(void)
{
// Count down every 500 ms.
if(u8_rec_fade_dly!=0) u8_rec_fade_dly--;
#ifdef EN_SERIAL
#ifdef EN_SERIAL
if(u8_ser_mode_dly!=0) u8_ser_mode_dly--;
#endif /* EN_SERIAL */
#endif /* EN_SERIAL */
}

//-------------------------------------- Check state of input power supply.
Expand Down Expand Up @@ -1781,7 +1780,7 @@ int main(void)
if((u8_state&STATE_SERIAL_DET)!=0)
{
// Fast heartbeat: FW alive, serial link is OK.
DBG_HRBT_TGL;
DBG_HRBT_ON;
}
// Filter ADC data from 12 V input channel.
filter_adc_ph1();
Expand All @@ -1790,6 +1789,11 @@ int main(void)
{
u8_tasks&=~TASK_5HZ_PH2;
// 5 Hz event (phase 2), 200 ms period.
if((u8_state&STATE_SERIAL_DET)!=0)
{
// Fast heartbeat: FW alive, serial link is OK.
DBG_HRBT_OFF;
}
// Filter ADC data from camera power channel.
filter_adc_ph2();
// Check state of incoming voltage.
Expand Down
2 changes: 1 addition & 1 deletion Beta10Pin/beta10p.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ enum
VIN_OFF = 19, // Input voltage 9.9 V
V_DIFF_MAX = 32, // Maximum allowed difference in voltages (~1.5 A consumption)
VD_CAM_ON_UP = 8, // Voltage difference for detected camera ON (current shunt 0.47 Ohm)
VD_CAM_ON_DN = 5, // Voltage difference for detected camera OFF (current shunt 0.47 Ohm)
VD_CAM_ON_DN = 6, // Voltage difference for detected camera OFF (current shunt 0.47 Ohm)
};

// Length of the buffer for each ADC channel before filtering.
Expand Down
10 changes: 6 additions & 4 deletions Beta10Pin/drv_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ Supported MCUs: ATmega48(-/A/P/AP), ATmega88(-/A/P/AP), ATmega168(-/A/P/AP), ATm
#define VTR_REC_PORT PORTD
#define VTR_REC_DIR DDRD
#define VTR_REC_BIT (1<<5) // Linked with EIAJ pin 6
#define VTR_REC_RUN (VTR_REC_PORT|=VTR_REC_BIT)
#define VTR_REC_PAUSE (VTR_REC_PORT&=~VTR_REC_BIT)
#define VTR_REC_RUN (VTR_REC_PORT&=~VTR_REC_BIT)
#define VTR_REC_PAUSE (VTR_REC_PORT|=VTR_REC_BIT)

// Camera record button input.
#define CAM_REC_PORT PORTD
Expand Down Expand Up @@ -136,10 +136,12 @@ Supported MCUs: ATmega48(-/A/P/AP), ATmega88(-/A/P/AP), ATmega168(-/A/P/AP), ATm
#define DBG_3_TGL (DBG_PORT^=DBG_3_PIN)
#define DBG_PWM OCR1B
#define DBG_HRBT_TGL DBG_3_TGL // Used to indicate alive firmware and serial link status (in production)
#define DBG_HRBT_ON DBG_3_ON
#define DBG_HRBT_OFF DBG_3_OFF
#define DBG_RECERR_ON DBG_2_OFF // Used to indicate NV-180 mechanical record state (in production)
#define DBG_RECERR_OFF DBG_2_ON
#define DBG_CAM_ON DBG_1_ON // Used to indicate camera presence (in production)
#define DBG_CAM_OFF DBG_1_OFF
#define DBG_CAM_ON DBG_1_OFF // Used to indicate camera presence (in production)
#define DBG_CAM_OFF DBG_1_ON

// Power supply ADC inputs.
#define ADC_INT ADC_vect // Interrupt vector alias
Expand Down
Loading

0 comments on commit 6428da6

Please sign in to comment.